From 5b364de1685e5bee5953e23da2552b5db4455a74 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 2 Jun 2020 09:10:40 +0200 Subject: Use dialogParent() instead of mainWindow() There are very few reasons to use mainWindow() directly. Especially for modal dialogs, using dialogParent() is important, since that guarantees the stacking order in case of other dialogs currently being open. Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6 Reviewed-by: hjk --- src/plugins/designer/formeditorw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/designer') diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp index 2e673033ae6..0076d62134b 100644 --- a/src/plugins/designer/formeditorw.cpp +++ b/src/plugins/designer/formeditorw.cpp @@ -706,7 +706,7 @@ void FormEditorData::saveSettings(QSettings *s) void FormEditorData::critical(const QString &errorMessage) { - QMessageBox::critical(ICore::mainWindow(), tr("Designer"), errorMessage); + QMessageBox::critical(ICore::dialogParent(), tr("Designer"), errorMessage); } // Apply the command shortcut to the action and connects to the command's keySequenceChanged signal -- cgit v1.2.3