summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-09-17 10:31:39 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-09-17 10:31:39 (GMT)
commit3db470f76b5e9cc576197164f666bd5d43bfbfbd (patch)
tree33760aacdb498c851f7447d1632a3e90cc3d8708
parent2ec5d3977e454815a11ad0a9b6e95f77b7e17d0f (diff)
downloadQt-3db470f76b5e9cc576197164f666bd5d43bfbfbd.zip
Qt-3db470f76b5e9cc576197164f666bd5d43bfbfbd.tar.gz
Qt-3db470f76b5e9cc576197164f666bd5d43bfbfbd.tar.bz2
Stabilize tst_QGraphicsItem::cacheMode on the Mac.
Problem was that the window got activated *after* the items were added to the scene, causing two repaints on the viewport.
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index fa163d8..2fc2b49 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -6542,6 +6542,9 @@ void tst_QGraphicsItem::cacheMode()
#ifdef Q_WS_X11
qt_x11_wait_for_window_manager(&view);
#endif
+ // Increase the probability of window activation
+ // not causing another repaint of test items.
+ QTest::qWait(250);
EventTester *tester = new EventTester;
EventTester *testerChild = new EventTester;