From 15b35c7dabbc26e879c483fd51864fbc273fdb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 2 Jan 2023 15:18:33 +0100 Subject: [PATCH] Don't use native dialogs for tst_QApplication::closeAllWindows() The test shows an application modal QMessageBox, but assumes that doing so will be non-blocking, which for macOS is not the case (yet). Instead of making the dialog window-modal, which would potentially affect the logic of the test, we disable native dialogs. This should be fine, as the purpose of the test is to test the is_closing logic of closeAllWindows, which lives on a layer above the native dialogs. Change-Id: I6d627984a6ca452b876f34404b669fce41a00851 Reviewed-by: Doris Verria (cherry picked from commit ad31b5f4c700fc7a66032fe14becc66b44c9d584) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 57bd4515ad4..3ed9743838c 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -886,6 +886,7 @@ void tst_QApplication::closeAllWindows() { int argc = 0; QApplication app(argc, nullptr); + app.setAttribute(Qt::AA_DontUseNativeDialogs, true); // create some windows new QWidget;