summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-14 09:11:40 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-07-14 15:55:30 +0200
commita2c7428e4dcfb30fa391083aff6618c1f54e777a (patch)
tree073a16a29feb2d7487d8943e39d38ce24f695d38 /tests/auto/widgets/graphicsview
parent845ea8921108c860da329ccfa34f0842958a6901 (diff)
QGraphicsWidget: skip test if graphics view fails to show
We set Qt::X11BypassWindowManagerHint on the view, which regularly makes the test fail on X11 systems in the QVERIFY(QTest::qWaitForWindowActive(dummyView.data())) check. If the view fails to show, skip the test instead of failing, we are not testing anything X11 specific here, running this test on other platforms will be good enough. Pick-to: 6.4 6.3 6.2 Fixes: QTBUG-98921 Change-Id: I46dbcddf51ee1e92eb3bbb29bb57fcc314266bea Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/widgets/graphicsview')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
index 9553b939e2..89548337aa 100644
--- a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -3099,7 +3099,8 @@ void tst_QGraphicsWidget::initialShow()
EventSpy paintSpy(dummyView->viewport(), QEvent::Paint);
dummyView->show();
qApp->setActiveWindow(dummyView.data());
- QVERIFY(QTest::qWaitForWindowActive(dummyView.data()));
+ if (!QTest::qWaitForWindowActive(dummyView.data()))
+ QSKIP("Graphics view failed to show (possibly due to Qt::X11BypassWindowManagerHint");
const int expectedRepaintCount = paintSpy.count();
dummyView.reset();