Stabilize tst_QMessageBox::hideNativeByDestruction()
The test was flaky, because of qWaitForWindowActive() after show(). It is not guaranteed, that a window has focus after show(). Use qWaitForWindowExposed() instead. Task-number: QTBUG-118489 Pick-to: 6.7 6.6 6.5 Change-Id: I1eb8a73f2beafec00c4a6f6b34bfd36a8d6e4d93 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
09eb99f011
commit
599328845c
|
|
@ -796,7 +796,7 @@ void tst_QMessageBox::hideNativeByDestruction()
|
|||
// Make it application modal so that we don't end up with a sheet on macOS
|
||||
dialog->setWindowModality(Qt::ApplicationModal);
|
||||
window.show();
|
||||
QVERIFY(QTest::qWaitForWindowActive(&window));
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&window));
|
||||
dialog->open();
|
||||
|
||||
// We test that the dialog opens and closes by watching the activation of the
|
||||
|
|
|
|||
Loading…
Reference in New Issue