From 3db470f76b5e9cc576197164f666bd5d43bfbfbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 17 Sep 2009 12:31:39 +0200 Subject: 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. --- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; -- cgit v0.12