From cf8dcda1316198f2e54195cf7b7137c7ae05f91b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 30 Sep 2009 14:46:40 +0200 Subject: Stabilize graphicsview test --- tests/auto/qgraphicsview/tst_qgraphicsview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index 0c27079..78fb4f3 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -3160,11 +3160,12 @@ void tst_QGraphicsView::moveItemWhileScrolling() if (!adjustForAntialiasing) view.setOptimizationFlag(QGraphicsView::DontAdjustForAntialiasing); view.resize(200, 200); + view.painted = false; view.show(); QTest::qWaitForWindowShown(&view); + QApplication::processEvents(); QTRY_VERIFY(view.painted); view.painted = false; - view.lastPaintedRegion = QRegion(); view.horizontalScrollBar()->setValue(view.horizontalScrollBar()->value() + 10); view.rect->moveBy(0, 10); @@ -3366,6 +3367,7 @@ void tst_QGraphicsView::render() view.painted = false; view.show(); QTest::qWaitForWindowShown(&view); + QApplication::processEvents(); QTRY_VERIFY(view.painted > 0); RenderTester *r1 = new RenderTester(QRectF(0, 0, 50, 50)); -- cgit v0.12