Fix testcase that fails when run individually
Executing the tst_qgraphicsitem::sorting() testcase individually always fails on my KDE/X11 desktop. The window never seems to have focus and the call to qWaitForWindowActive() returns error after a few seconds. It seems qApp->setActiveWindow(&view) never succeeds in giving focus to the window containing the widget. Fixes: QTBUG-105221 Task-number: QTBUG-74760 Change-Id: I148dab09d0fb592376b3902e4ed10799f9a52274 Done-with: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
parent
1022922037
commit
dff9fa2ee1
@ -8222,7 +8222,7 @@ void tst_QGraphicsItem::sorting()
|
||||
view.setFrameStyle(0);
|
||||
view.show();
|
||||
if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation)) {
|
||||
qApp->setActiveWindow(&view);
|
||||
view.window()->activateWindow();
|
||||
QVERIFY(QTest::qWaitForWindowActive(&view));
|
||||
}
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
||||
|
Loading…
Reference in New Issue
Block a user