summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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())));
}
}