diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2018-05-02 11:24:31 +0300 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2018-05-02 09:04:14 +0000 |
commit | 3761d99512244ae167a66e6894c75eb2ef1cca48 (patch) | |
tree | 9f865f1769db51898253ce2aca79b1dff6486c4c | |
parent | 259648f876b2092f7d28925ba4569ac8a5612ca8 (diff) |
tst_QTabWidget: Add unconditional qWait() back
paintEventCount() is currently flaky on macOS. It gets extra paint events after
qWaitForWindowExposed() returns, which causes the following assertions to fail.
Add the wait that was removed in 0cb940b1d3b9a1ba50f2d1973fca411706da266d back
to fix those failures.
Task-number: QTBUG-68032
Change-Id: I68e0b6008de40922ec740291dfdd1842e0f62f89
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
-rw-r--r-- | tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp index cd7fe3710d..cbf5196bb9 100644 --- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp +++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp @@ -549,7 +549,9 @@ void tst_QTabWidget::paintEventCount() QCOMPARE(tw->currentIndex(), 0); tw->show(); - QVERIFY(QTest::qWaitForWindowActive(tw)); + QVERIFY(QTest::qWaitForWindowExposed(tw)); + // Wait for extra paint events that happen at least on macOS + QTest::qWait(1000); // Mac, Windows and Windows CE get multiple repaints on the first show, so use those as a starting point. static const int MaxInitialPaintCount = |