use qWaitForWindowExposed instead of qWaitForWindowActive

The qWaitForWindowActive() function returns false when the test is
run inside Xvfb and there is no window manager.
Forwarded: no
Last-Update: 2019-04-21

Gbp-Pq: Name wait_for_window_exposed.patch
This commit is contained in:
Dmitry Shachnev 2022-05-14 17:42:41 +08:00 committed by openKylinBot
parent d1c6924724
commit e10387d609
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ void tst_SignalSpy::testCount()
window.resize(200, 200);
window.setSource(testFileUrl("signalspy.qml"));
window.show();
QVERIFY(QTest::qWaitForWindowActive(&window));
QVERIFY(QTest::qWaitForWindowExposed(&window));
QVERIFY(window.rootObject() != nullptr);
QObject *mouseSpy = window.rootObject()->findChild<QObject*>("mouseSpy");