diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-06-02 09:10:40 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-06-02 11:44:53 +0000 |
commit | 5b364de1685e5bee5953e23da2552b5db4455a74 (patch) | |
tree | 13f505553880048143feea6678dbd09e31558599 /src/plugins/debugger/qml/qmlengine.cpp | |
parent | 26d46fc19dccb3b599dcd24f2a3701b7c4e25d2b (diff) |
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 <hjk@qt.io>
Diffstat (limited to 'src/plugins/debugger/qml/qmlengine.cpp')
-rw-r--r-- | src/plugins/debugger/qml/qmlengine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 064170fe32..e4faf22abd 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -404,7 +404,7 @@ void QmlEngine::connectionStartupFailed() return; } - auto infoBox = new QMessageBox(ICore::mainWindow()); + auto infoBox = new QMessageBox(ICore::dialogParent()); infoBox->setIcon(QMessageBox::Critical); infoBox->setWindowTitle(Core::Constants::IDE_DISPLAY_NAME); infoBox->setText(tr("Could not connect to the in-process QML debugger." @@ -425,7 +425,7 @@ void QmlEngine::appStartupFailed(const QString &errorMessage) QString error = tr("Could not connect to the in-process QML debugger. %1").arg(errorMessage); if (companionEngine()) { - auto infoBox = new QMessageBox(ICore::mainWindow()); + auto infoBox = new QMessageBox(ICore::dialogParent()); infoBox->setIcon(QMessageBox::Critical); infoBox->setWindowTitle(Core::Constants::IDE_DISPLAY_NAME); infoBox->setText(error); |