summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qmainwindow
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2018-04-06 16:25:21 +0300
committerKari Oikarinen <kari.oikarinen@qt.io>2018-04-25 11:55:34 +0000
commit0cb940b1d3b9a1ba50f2d1973fca411706da266d (patch)
tree326e6a32edef67c9e4000862a47fa49db2dd8263 /tests/auto/widgets/widgets/qmainwindow
parent7917305aa5acdad117632bc2723d9bec85daa0e0 (diff)
tests/auto/widgets/widgets: Avoid unconditional qWait()s
Task-number: QTBUG-63992 Change-Id: I7b0c259800082284ddae4e25d139ad3adc858467 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'tests/auto/widgets/widgets/qmainwindow')
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
index 30dc1e6043..ae71663036 100644
--- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
@@ -1745,17 +1745,15 @@ void tst_QMainWindow::setCursor()
QCOMPARE(cur.shape(), mw.cursor().shape());
mw.resize(200,200);
mw.show();
- QTest::qWait(50);
+ QVERIFY(QTest::qWaitForWindowActive(&mw));
QCOMPARE(cur.shape(), mw.cursor().shape());
QHoverEvent enterE(QEvent::HoverEnter, QPoint(10,10), QPoint());
mw.event(&enterE);
- QTest::qWait(50);
QCOMPARE(cur.shape(), mw.cursor().shape());
QHoverEvent leaveE(QEvent::HoverLeave, QPoint(), QPoint());
mw.event(&leaveE);
- QTest::qWait(50);
QCOMPARE(cur.shape(), mw.cursor().shape());
}
#endif
@@ -1844,7 +1842,7 @@ void tst_QMainWindow::dockWidgetSize()
mainWindow.addDockWidget(Qt::TopDockWidgetArea, &dock);
mainWindow.show();
- QTest::qWait(100);
+ QVERIFY(QTest::qWaitForWindowActive(&mainWindow));
if (mainWindow.size() == mainWindow.sizeHint()) {
QCOMPARE(widget.size(), widget.sizeHint());
QCOMPARE(dock.widget()->size(), dock.widget()->sizeHint());