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.

Pick-to: 6.5
Change-Id: I6d627984a6ca452b876f34404b669fce41a00851
Reviewed-by: Doris Verria <doris.verria@qt.io>
This commit is contained in:
Tor Arne Vestbø 2023-01-02 15:18:33 +01:00
parent 351d3e50f9
commit ad31b5f4c7

View File

@ -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;