From 5b276d5940fa12b80bee53946c87fa1fe2983f57 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 29 Feb 2024 08:07:57 +0100 Subject: [PATCH] Android: Use more ICore::dialogParent() This is usually the better choice because it takes dialogs into account. I had one message box vanish behind the rest of Qt Creator, which could be better with this. Change-Id: I47b93e120a9e86f9f81da8e542477f1c6274bf87 Reviewed-by: Assam Boudjelthia --- src/plugins/android/androidsdkmanagerwidget.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/plugins/android/androidsdkmanagerwidget.cpp b/src/plugins/android/androidsdkmanagerwidget.cpp index e5f0d27345f..7b1ca4e88f5 100644 --- a/src/plugins/android/androidsdkmanagerwidget.cpp +++ b/src/plugins/android/androidsdkmanagerwidget.cpp @@ -7,6 +7,8 @@ #include "androidsdkmodel.h" #include "androidtr.h" +#include + #include #include #include @@ -275,7 +277,7 @@ void AndroidSdkManagerWidget::installEssentials() { m_sdkModel->selectMissingEssentials(); if (!m_sdkModel->missingEssentials().isEmpty()) { - QMessageBox::warning(this, + QMessageBox::warning(Core::ICore::dialogParent(), Tr::tr("Android SDK Changes"), Tr::tr("%1 cannot find the following essential packages: \"%2\".\n" "Install them manually after the current operation is done.\n") @@ -321,8 +323,11 @@ void AndroidSdkManagerWidget::onApplyButton(const QString &extraMessage) QString message = Tr::tr("%n Android SDK packages shall be updated.", "", packagesToUpdate.count()); if (!extraMessage.isEmpty()) message.prepend(extraMessage + "\n\n"); - QMessageBox messageDlg(QMessageBox::Information, Tr::tr("Android SDK Changes"), - message, QMessageBox::Ok | QMessageBox::Cancel, this); + QMessageBox messageDlg(QMessageBox::Information, + Tr::tr("Android SDK Changes"), + message, + QMessageBox::Ok | QMessageBox::Cancel, + Core::ICore::dialogParent()); QString details; if (!uninstallPackages.isEmpty())