summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicseffect
diff options
context:
space:
mode:
authorToby Tomkins <toby.tomkins@nokia.com>2010-04-06 13:43:38 +1000
committerToby Tomkins <toby.tomkins@nokia.com>2010-04-06 13:43:38 +1000
commit5f377ecf7a473094908f9355b4c22fdcbd83c0d5 (patch)
tree17d08a173e5db5872bb4ae90e6370a22577de13d /tests/auto/qgraphicseffect
parentff8f6b0e5f76e4d4b1612a80325d6f66c825597f (diff)
Remove qWait functions as it is used in QTRY_* macros.
Reviewed-by: rohan mcgovern
Diffstat (limited to 'tests/auto/qgraphicseffect')
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp36
1 files changed, 13 insertions, 23 deletions
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index 49b840f959..dbd4a233f1 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -277,9 +277,8 @@ void tst_QGraphicsEffect::draw()
// Make sure installing the effect triggers a repaint.
CustomEffect *effect = new CustomEffect;
item->setGraphicsEffect(effect);
- QTest::qWait(50);
- QCOMPARE(effect->numRepaints, 1);
- QCOMPARE(item->numRepaints, 1);
+ QTRY_COMPARE(effect->numRepaints, 1);
+ QTRY_COMPARE(item->numRepaints, 1);
// Make sure QPainter* and QStyleOptionGraphicsItem* stays persistent
// during QGraphicsEffect::draw/QGraphicsItem::paint.
@@ -293,26 +292,23 @@ void tst_QGraphicsEffect::draw()
// Make sure updating the source triggers a repaint.
item->update();
- QTest::qWait(50);
- QCOMPARE(effect->numRepaints, 1);
- QCOMPARE(item->numRepaints, 1);
+ QTRY_COMPARE(effect->numRepaints, 1);
+ QTRY_COMPARE(item->numRepaints, 1);
QVERIFY(effect->m_sourceChangedFlags & QGraphicsEffect::SourceInvalidated);
effect->reset();
item->reset();
// Make sure changing the effect's bounding rect triggers a repaint.
effect->setMargin(20);
- QTest::qWait(50);
- QCOMPARE(effect->numRepaints, 1);
- QCOMPARE(item->numRepaints, 1);
+ QTRY_COMPARE(effect->numRepaints, 1);
+ QTRY_COMPARE(item->numRepaints, 1);
effect->reset();
item->reset();
// Make sure change the item's bounding rect triggers a repaint.
item->setRect(0, 0, 50, 50);
- QTest::qWait(50);
- QCOMPARE(effect->numRepaints, 1);
- QCOMPARE(item->numRepaints, 1);
+ QTRY_COMPARE(effect->numRepaints, 1);
+ QTRY_COMPARE(item->numRepaints, 1);
QVERIFY(effect->m_sourceChangedFlags & QGraphicsEffect::SourceBoundingRectChanged);
effect->reset();
item->reset();
@@ -320,8 +316,7 @@ void tst_QGraphicsEffect::draw()
// Make sure the effect is the one to issue a repaint of the item.
effect->doNothingInDraw = true;
item->update();
- QTest::qWait(50);
- QCOMPARE(effect->numRepaints, 1);
+ QTRY_COMPARE(effect->numRepaints, 1);
QCOMPARE(item->numRepaints, 0);
effect->doNothingInDraw = false;
effect->reset();
@@ -336,9 +331,8 @@ void tst_QGraphicsEffect::draw()
item->reset();
effect->setEnabled(true);
- QTest::qWait(50);
- QCOMPARE(effect->numRepaints, 1);
- QCOMPARE(item->numRepaints, 1);
+ QTRY_COMPARE(effect->numRepaints, 1);
+ QTRY_COMPARE(item->numRepaints, 1);
effect->reset();
item->reset();
@@ -352,8 +346,7 @@ void tst_QGraphicsEffect::draw()
QPointer<CustomEffect> ptr = effect;
item->setGraphicsEffect(0);
QVERIFY(!ptr);
- QTest::qWait(50);
- QCOMPARE(item->numRepaints, 1);
+ QTRY_COMPARE(item->numRepaints, 1);
}
void tst_QGraphicsEffect::opacity()
@@ -515,7 +508,6 @@ void tst_QGraphicsEffect::drawPixmapItem()
QTRY_VERIFY(effect->repaints >= 1);
item->rotate(180);
- QTest::qWait(50);
QTRY_VERIFY(effect->repaints >= 2);
}
@@ -560,9 +552,8 @@ void tst_QGraphicsEffect::deviceCoordinateTranslateCaching()
int numRepaints = item->numRepaints;
item->translate(10, 0);
- QTest::qWait(50);
- QVERIFY(item->numRepaints == numRepaints);
+ QTRY_VERIFY(item->numRepaints == numRepaints);
}
void tst_QGraphicsEffect::inheritOpacity()
@@ -588,7 +579,6 @@ void tst_QGraphicsEffect::inheritOpacity()
int numRepaints = item->numRepaints;
rectItem->setOpacity(1);
- QTest::qWait(50);
// item should have been rerendered due to opacity changing
QTRY_VERIFY(item->numRepaints > numRepaints);