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. Fixes: QTBUG-98921 Change-Id: I46dbcddf51ee1e92eb3bbb29bb57fcc314266bea Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit a2c7428e4dcfb30fa391083aff6618c1f54e777a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
3073401ff6
commit
ca7a2f84de
@ -3099,7 +3099,8 @@ void tst_QGraphicsWidget::initialShow()
|
|||||||
EventSpy paintSpy(dummyView->viewport(), QEvent::Paint);
|
EventSpy paintSpy(dummyView->viewport(), QEvent::Paint);
|
||||||
dummyView->show();
|
dummyView->show();
|
||||||
qApp->setActiveWindow(dummyView.data());
|
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();
|
const int expectedRepaintCount = paintSpy.count();
|
||||||
dummyView.reset();
|
dummyView.reset();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user