summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtableview
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-14 16:23:35 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-14 16:23:35 (GMT)
commit5e92ae16f80d6a0a824744fa4a2bdb7d6ce726e0 (patch)
tree415aa0d55afbaf2ee565381b701501e60849761f /tests/auto/qtableview
parentfad919927f2ab2ca3e9eebb59c5f3a9171b068a5 (diff)
downloadQt-5e92ae16f80d6a0a824744fa4a2bdb7d6ce726e0.zip
Qt-5e92ae16f80d6a0a824744fa4a2bdb7d6ce726e0.tar.gz
Qt-5e92ae16f80d6a0a824744fa4a2bdb7d6ce726e0.tar.bz2
stabilize QTableView test on cocoa
Diffstat (limited to 'tests/auto/qtableview')
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index d92656c..5ff217c 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -2703,6 +2703,7 @@ void tst_QTableView::indexAt()
QtTestTableView view;
view.show();
+ QTest::qWaitForWindowShown(&view);
//some styles change the scroll mode in their polish
view.setHorizontalScrollMode(QAbstractItemView::ScrollPerItem);
@@ -2718,9 +2719,10 @@ void tst_QTableView::indexAt()
for (int c = 0; c < columnCount; ++c)
view.setColumnWidth(c, columnWidth);
- QTest::qWait(0); // ### needed to pass the test
+ QTest::qWait(20);
view.horizontalScrollBar()->setValue(horizontalScroll);
view.verticalScrollBar()->setValue(verticalScroll);
+ QTest::qWait(20);
QModelIndex index = view.indexAt(QPoint(x, y));
QCOMPARE(index.row(), expectedRow);