diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-10-11 10:01:00 +0200 |
---|---|---|
committer | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-10-15 20:39:32 +0200 |
commit | 80ddac3a0a9984e1dc4da6440912cfcfd210a380 (patch) | |
tree | 920a2a5b16fd867e2acda395292468710c010c7e /tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp | |
parent | 51f092905a2cb38feb5fef759b5ac8b417df0996 (diff) |
tst_qgraphicseffect: Wait for exposed instead of active
Makes the test pass on Wayland.
Task-number: QTBUG-62188
Change-Id: I3900925e74d8d940a8c5af87ea64a6ec3c8c3293
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp')
-rw-r--r-- | tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp index c4b6e22c37..19288d07a7 100644 --- a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp @@ -311,7 +311,7 @@ void tst_QGraphicsEffect::draw() QGraphicsView view(&scene); view.show(); - QVERIFY(QTest::qWaitForWindowActive(&view)); + QVERIFY(QTest::qWaitForWindowExposed(&view)); QTRY_VERIFY(item->numRepaints > 0); QCoreApplication::processEvents(); // Process all queued paint events item->reset(); @@ -668,8 +668,7 @@ void tst_QGraphicsEffect::childrenVisibilityShouldInvalidateCache() scene.addItem(&parent); QGraphicsView view(&scene); view.show(); - QApplication::setActiveWindow(&view); - QVERIFY(QTest::qWaitForWindowActive(&view)); + QVERIFY(QTest::qWaitForWindowExposed(&view)); QTRY_VERIFY(parent.nbPaint >= 1); //we set an effect on the parent parent.setGraphicsEffect(new QGraphicsDropShadowEffect(&parent)); @@ -694,8 +693,7 @@ void tst_QGraphicsEffect::prepareGeometryChangeInvalidateCache() QGraphicsView view(&scene); view.show(); - qApp->setActiveWindow(&view); - QVERIFY(QTest::qWaitForWindowActive(&view)); + QVERIFY(QTest::qWaitForWindowExposed(&view)); QTRY_VERIFY(item->nbPaint >= 1); item->nbPaint = 0; @@ -726,8 +724,7 @@ void tst_QGraphicsEffect::itemHasNoContents() QGraphicsView view(&scene); view.show(); - qApp->setActiveWindow(&view); - QVERIFY(QTest::qWaitForWindowActive(&view)); + QVERIFY(QTest::qWaitForWindowExposed(&view)); QTRY_VERIFY(child->nbPaint >= 1); CustomEffect *effect = new CustomEffect; |