diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-09-06 14:04:24 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-07 08:35:48 +0200 |
commit | 3883b4f5b1a55922bdbe4e69109ff1f6b7f8277d (patch) | |
tree | bfca6c6d9c14ca4b6770f082f3390ed981cf87fb /tests | |
parent | 3769646dd3e925b58625eace216a964fea5bf7f4 (diff) |
Fixed tst_graphicseffect auto-test failures.
Some of these trigger pre-refactor as well by adding a QTest::qWait()
after QTest::qWaitForWindowShown().
Change-Id: I48863fd31fc0c3b51463ed922782e86c21f05bff
Reviewed-on: http://codereview.qt.nokia.com/4272
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp index b4b09fc6db..334406272e 100644 --- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp @@ -688,18 +688,18 @@ void tst_QGraphicsEffect::childrenVisibilityShouldInvalidateCache() view.show(); QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QTRY_COMPARE(parent.nbPaint, 1); + QTRY_VERIFY(parent.nbPaint >= 1); //we set an effect on the parent parent.setGraphicsEffect(new QGraphicsDropShadowEffect(&parent)); //flush the events QApplication::processEvents(); //new effect applied->repaint - QCOMPARE(parent.nbPaint, 2); + QVERIFY(parent.nbPaint >= 2); child.setVisible(true); //flush the events QApplication::processEvents(); //a new child appears we need to redraw the effect. - QCOMPARE(parent.nbPaint, 3); + QVERIFY(parent.nbPaint >= 3); } void tst_QGraphicsEffect::prepareGeometryChangeInvalidateCache() @@ -716,7 +716,7 @@ void tst_QGraphicsEffect::prepareGeometryChangeInvalidateCache() else view.show(); QTest::qWaitForWindowShown(&view); - QTRY_COMPARE(item->nbPaint, 1); + QTRY_VERIFY(item->nbPaint >= 1); item->nbPaint = 0; item->setGraphicsEffect(new QGraphicsDropShadowEffect); @@ -747,7 +747,7 @@ void tst_QGraphicsEffect::itemHasNoContents() QGraphicsView view(&scene); view.show(); QTest::qWaitForWindowShown(&view); - QTRY_COMPARE(child->nbPaint, 1); + QTRY_VERIFY(child->nbPaint >= 1); CustomEffect *effect = new CustomEffect; parent->setGraphicsEffect(effect); |