summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@viroteck.net>2014-08-17 22:01:21 +0200
committerRobin Burchell <robin.burchell@viroteck.net>2014-08-18 13:52:54 +0200
commitac1f1c42c7728a78a776b5290e3442823debd659 (patch)
treee8b8cb1c8f9f549728dfd7aca7c44aa8c9235414 /tests
parent59ba84d31cf17d86e615e2958fece6f6e0bbefe2 (diff)
tst_qlistview: Convert some qWaits into QTRY_* usage.
This takes the total runtime of tst_qlistview for me from ~47 seconds to ~10 seconds. Change-Id: Ie6fe95fe0852c2de37e99c2ad02230de78e0995e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index 78a3ad021b..b36b5aef8a 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -2235,8 +2235,7 @@ void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys()
QTest::keyClick(&lv, Qt::Key_Down);
else
QTest::keyClick(&lv, Qt::Key_Right);
- QTest::qWait(100);
- QVERIFY(lv.rect().contains(lv.visualRect(lv.currentIndex())));
+ QTRY_VERIFY(lv.rect().contains(lv.visualRect(lv.currentIndex())));
}
// scroll backward
@@ -2245,8 +2244,7 @@ void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys()
QTest::keyClick(&lv, Qt::Key_Up);
else
QTest::keyClick(&lv, Qt::Key_Left);
- QTest::qWait(100);
- QVERIFY(lv.rect().contains(lv.visualRect(lv.currentIndex())));
+ QTRY_VERIFY(lv.rect().contains(lv.visualRect(lv.currentIndex())));
}
// scroll forward only half way
@@ -2255,8 +2253,7 @@ void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys()
QTest::keyClick(&lv, Qt::Key_Down);
else
QTest::keyClick(&lv, Qt::Key_Right);
- QTest::qWait(100);
- QVERIFY(lv.rect().contains(lv.visualRect(lv.currentIndex())));
+ QTRY_VERIFY(lv.rect().contains(lv.visualRect(lv.currentIndex())));
}
// scroll backward again
@@ -2265,8 +2262,7 @@ void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys()
QTest::keyClick(&lv, Qt::Key_Up);
else
QTest::keyClick(&lv, Qt::Key_Left);
- QTest::qWait(100);
- QVERIFY(lv.rect().contains(lv.visualRect(lv.currentIndex())));
+ QTRY_VERIFY(lv.rect().contains(lv.visualRect(lv.currentIndex())));
}
}