summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2011-05-31 08:22:14 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2011-05-31 08:34:51 (GMT)
commit8293336590722f6a92a6b4af401485683b5508fa (patch)
treec5b341e7daa0f555475cf40e60f9e5ed3b2eea69 /tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
parent20dbb967f030041d1dc94b989b0b085ca84baa33 (diff)
downloadQt-8293336590722f6a92a6b4af401485683b5508fa.zip
Qt-8293336590722f6a92a6b4af401485683b5508fa.tar.gz
Qt-8293336590722f6a92a6b4af401485683b5508fa.tar.bz2
Fix tst_QGraphicsItem::sorting() test case for Symbian
Some devices have bigger than expected minimum width for scrollbars, which broke the sorting test case as some objects that were expected to be painted were fully obscured by scrollbars and therefore skipped. Task-number: QT-5048 Reviewed-by: Janne Koskinen
Diffstat (limited to 'tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp')
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 15ed242..37893d8 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -8029,7 +8029,16 @@ void tst_QGraphicsItem::sorting()
QGraphicsView view(&scene);
view.setResizeAnchor(QGraphicsView::NoAnchor);
view.setTransformationAnchor(QGraphicsView::NoAnchor);
+#ifdef Q_OS_SYMBIAN
+ // Adjust area in devices where scrollbars are thicker than 25 pixels as they will
+ // obstruct painting otherwise.
+ int scrollWidth = qMax(25, view.verticalScrollBar()->width());
+ int scrollHeight = qMax(25, view.horizontalScrollBar()->height());
+
+ view.resize(95 + scrollWidth, 75 + scrollHeight);
+#else
view.resize(120, 100);
+#endif
view.setFrameStyle(0);
view.show();
#ifdef Q_WS_X11