diff options
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertool.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertool.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 274935b8a4..4f8adf13c6 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -92,6 +92,7 @@ using namespace Debugger; using namespace Debugger::Constants; using namespace QmlProfiler::Constants; using namespace ProjectExplorer; +using namespace Utils; namespace QmlProfiler { namespace Internal { @@ -351,7 +352,7 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker) connect(d->m_profilerConnections, &QmlProfilerClientManager::connectionFailed, runWorker, [this, runWorker]() { - auto infoBox = new QMessageBox(ICore::mainWindow()); + auto infoBox = new QMessageBox(ICore::dialogParent()); infoBox->setIcon(QMessageBox::Critical); infoBox->setWindowTitle(Core::Constants::IDE_DISPLAY_NAME); @@ -580,7 +581,7 @@ void QmlProfilerTool::logError(const QString &msg) void QmlProfilerTool::showErrorDialog(const QString &error) { - auto errorDialog = new QMessageBox(ICore::mainWindow()); + auto errorDialog = new QMessageBox(ICore::dialogParent()); errorDialog->setIcon(QMessageBox::Warning); errorDialog->setWindowTitle(tr("QML Profiler")); errorDialog->setText(error); @@ -604,7 +605,7 @@ void QmlProfilerTool::showSaveDialog() QLatin1String tFile(QtdFileExtension); QLatin1String zFile(QztFileExtension); QString filename = QFileDialog::getSaveFileName( - ICore::mainWindow(), tr("Save QML Trace"), + ICore::dialogParent(), tr("Save QML Trace"), QmlProfilerPlugin::globalSettings()->lastTraceFile(), tr("QML traces (*%1 *%2)").arg(zFile).arg(tFile)); if (!filename.isEmpty()) { @@ -628,7 +629,7 @@ void QmlProfilerTool::showLoadDialog() QLatin1String tFile(QtdFileExtension); QLatin1String zFile(QztFileExtension); QString filename = QFileDialog::getOpenFileName( - ICore::mainWindow(), tr("Load QML Trace"), + ICore::dialogParent(), tr("Load QML Trace"), QmlProfilerPlugin::globalSettings()->lastTraceFile(), tr("QML traces (*%1 *%2)").arg(zFile).arg(tFile)); @@ -773,7 +774,7 @@ QList <QAction *> QmlProfilerTool::profilerContextMenuActions() void QmlProfilerTool::showNonmodalWarning(const QString &warningMsg) { - auto noExecWarning = new QMessageBox(ICore::mainWindow()); + auto noExecWarning = new QMessageBox(ICore::dialogParent()); noExecWarning->setIcon(QMessageBox::Warning); noExecWarning->setWindowTitle(tr("QML Profiler")); noExecWarning->setText(warningMsg); |