From 5e92ae16f80d6a0a824744fa4a2bdb7d6ce726e0 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 14 Oct 2009 18:23:35 +0200 Subject: stabilize QTableView test on cocoa --- tests/auto/qtableview/tst_qtableview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v0.12