From 6324873543afd7b76d476bd43e3b85e84ea70c00 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 25 Feb 2020 16:20:42 +0100 Subject: Stabilize task255529_transformationAnchorMouseAndViewportMargins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This test doesn't test whether window activation works, so there is no reason to fail the test if it doesn't. Instead, abort the test, so that we can record it as a skipped test. Change-Id: Ia44308ef17f110d40c6455d7ee85d90914face4f Fixes: QTBUG-22455 Reviewed-by: Jan Arve Sæther Reviewed-by: Levon Sargsyan --- tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/auto/widgets/graphicsview/qgraphicsview') diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index e21b1b889a..f02835aa90 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -4553,7 +4553,9 @@ void tst_QGraphicsView::task255529_transformationAnchorMouseAndViewportMargins() view.show(); qApp->setActiveWindow(&view); QVERIFY(QTest::qWaitForWindowExposed(&view)); - QVERIFY(QTest::qWaitForWindowActive(&view)); + const bool isActiveWindow = QTest::qWaitForWindowActive(&view); + if (!isActiveWindow) + QSKIP("Window activation failed, skipping test", Abort); // This is highly unstable (observed to pass on Windows and some Linux configurations). #ifndef Q_OS_MAC for (int i = 0; i < 4; ++i) { -- cgit v1.2.3