summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp
index 6e211ae..3968529 100644
--- a/tests/auto/qlistview/tst_qlistview.cpp
+++ b/tests/auto/qlistview/tst_qlistview.cpp
@@ -1132,6 +1132,7 @@ void tst_QListView::selection()
#endif
v.show();
+ QTest::qWaitForWindowShown(&v);
QApplication::processEvents();
v.setSelection(selectionRect, QItemSelectionModel::ClearAndSelect);
@@ -1184,6 +1185,7 @@ void tst_QListView::scrollTo()
lv.setModel(&model);
lv.setFixedSize(100, 200);
lv.show();
+ QTest::qWaitForWindowShown(&lv);
//by default, the list view scrolls per item and has no wrapping
QModelIndex index = model.index(6,0);
@@ -1782,12 +1784,13 @@ void tst_QListView::task262152_setModelColumnNavigate()
view.setModelColumn(1);
view.show();
- QTest::qWait(100);
+ QTest::qWaitForWindowShown(&view);
+ QTest::qWait(10);
QTest::keyClick(&view, Qt::Key_Down);
- QTest::qWait(100);
+ QTest::qWait(10);
QCOMPARE(view.currentIndex(), model.index(1,1));
QTest::keyClick(&view, Qt::Key_Down);
- QTest::qWait(100);
+ QTest::qWait(10);
QCOMPARE(view.currentIndex(), model.index(2,1));
}