Stabilize task255529_transformationAnchorMouseAndViewportMargins

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 <jan-arve.saether@qt.io>
Reviewed-by: Levon Sargsyan <levon.sargsyan@qt.io>
This commit is contained in:
Volker Hilsheimer 2020-02-25 16:20:42 +01:00
parent e30aa59a89
commit 6324873543

View File

@ -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) {