diff --git a/src/plugins/autotest/testrunner.cpp b/src/plugins/autotest/testrunner.cpp index 1b0408452e77c0aa27dc514cafd58140a2f2de0d..f02262f891bca981c7dc76ca03a6a77b8d9001a5 100644 --- a/src/plugins/autotest/testrunner.cpp +++ b/src/plugins/autotest/testrunner.cpp @@ -346,9 +346,7 @@ void TestRunner::debugTests() connect(this, &TestRunner::requestStopTestRun, runControl, &Debugger::DebuggerRunControl::stop); connect(runControl, &Debugger::DebuggerRunControl::finished, this, &TestRunner::onFinished); - ProjectExplorer::ProjectExplorerPlugin::startRunControl( - runControl, ProjectExplorer::Constants::DEBUG_RUN_MODE); - + ProjectExplorer::ProjectExplorerPlugin::startRunControl(runControl); } void TestRunner::runOrDebugTests() diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 6265c54812c054b331c9bb423127d7ac344c1581..c983c096ba3be7a9a826e922b33eb16ebfefae92 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -2127,7 +2127,7 @@ void DebuggerPlugin::attachExternalApplication(RunControl *rc) if (RunConfiguration *runConfig = rc->runConfiguration()) { auto runControl = new DebuggerRunControl(runConfig, ProjectExplorer::Constants::DEBUG_RUN_MODE); (void) new DebuggerRunTool(runControl, rp); - ProjectExplorerPlugin::startRunControl(runControl, ProjectExplorer::Constants::DEBUG_RUN_MODE); + ProjectExplorerPlugin::startRunControl(runControl); } else { createAndScheduleRun(rp, guessKitFromParameters(rp)); } @@ -3712,7 +3712,7 @@ void DebuggerUnitTests::testStateMachine() auto runControl = new DebuggerRunControl(rc, ProjectExplorer::Constants::DEBUG_RUN_MODE); (void) new DebuggerRunTool(runControl, rp); - ProjectExplorerPlugin::startRunControl(runControl, ProjectExplorer::Constants::DEBUG_RUN_MODE); + ProjectExplorerPlugin::startRunControl(runControl); connect(runControl, &RunControl::finished, this, [this] { QTestEventLoop::instance().exitLoop(); diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index df9c20142480ff900e9d7bcc4546cd6517ef2f02..23a71d06e41461ad9f8f540234bdbcd816d19b50 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -674,7 +674,7 @@ RunControl *createAndScheduleRun(const DebuggerRunParameters &rp, Kit *kit) auto runControl = new DebuggerRunControl(runConfig, DebugRunMode); (void) new DebuggerRunTool(runControl, rp); QTC_ASSERT(runControl, return nullptr); - ProjectExplorerPlugin::startRunControl(runControl, ProjectExplorer::Constants::DEBUG_RUN_MODE); + ProjectExplorerPlugin::startRunControl(runControl); return runControl; } diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index fe9ac7a10ec7acaf2609ccc17d94b865a6e57b08..6b0740baca0ce1385333ffd1faad00a694424d3e 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -3330,7 +3330,7 @@ void GdbEngine::handleMakeSnapshot(const DebuggerResponse &response, const QStri rp.isSnapshot = true; auto rc = new DebuggerRunControl(runControl()->runConfiguration(), ProjectExplorer::Constants::DEBUG_RUN_MODE); (void) new DebuggerRunTool(rc, rp); - ProjectExplorerPlugin::startRunControl(rc, ProjectExplorer::Constants::DEBUG_RUN_MODE); + ProjectExplorerPlugin::startRunControl(rc); } else { QString msg = response.data["msg"].data(); AsynchronousMessageBox::critical(tr("Snapshot Creation Error"), diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index b57ef51ec012c5c8cd1bbd267c31f91361b1650e..20f4d27ea171ba01e07661d384c9c538c8a22230 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -283,7 +283,7 @@ public: QPair<bool, QString> buildSettingsEnabled(const Project *pro); void addToRecentProjects(const QString &fileName, const QString &displayName); - void startRunControl(RunControl *runControl, Core::Id runMode); + void startRunControl(RunControl *runControl); void updateActions(); void updateContext(); @@ -2005,7 +2005,7 @@ void ProjectExplorerPluginPrivate::executeRunConfiguration(RunConfiguration *run m_instance->showRunErrorMessage(errorMessage); return; } - startRunControl(control, runMode); + startRunControl(control); } } @@ -2017,16 +2017,17 @@ void ProjectExplorerPlugin::showRunErrorMessage(const QString &errorMessage) QMessageBox::critical(ICore::mainWindow(), errorMessage.isNull() ? tr("Unknown error") : tr("Could Not Run"), errorMessage); } -void ProjectExplorerPlugin::startRunControl(RunControl *runControl, Core::Id runMode) +void ProjectExplorerPlugin::startRunControl(RunControl *runControl) { - dd->startRunControl(runControl, runMode); + dd->startRunControl(runControl); } -void ProjectExplorerPluginPrivate::startRunControl(RunControl *runControl, Core::Id runMode) +void ProjectExplorerPluginPrivate::startRunControl(RunControl *runControl) { m_outputPane->createNewOutputWindow(runControl); m_outputPane->flash(); // one flash for starting m_outputPane->showTabFor(runControl); + Core::Id runMode = runControl->runMode(); bool popup = (runMode == Constants::NORMAL_RUN_MODE && dd->m_projectExplorerSettings.showRunOutput) || ((runMode == Constants::DEBUG_RUN_MODE || runMode == Constants::DEBUG_RUN_MODE_WITH_BREAK_ON_MAIN) && m_projectExplorerSettings.showDebugOutput); diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h index cb63dc6497034b9570022056f06c395667f4ea12..3a596a6d3affa7acc020f10aa3916fb7674fdfd6 100644 --- a/src/plugins/projectexplorer/projectexplorer.h +++ b/src/plugins/projectexplorer/projectexplorer.h @@ -127,7 +127,7 @@ public: static void setProjectExplorerSettings(const Internal::ProjectExplorerSettings &pes); static Internal::ProjectExplorerSettings projectExplorerSettings(); - static void startRunControl(RunControl *runControl, Core::Id runMode); + static void startRunControl(RunControl *runControl); static void showRunErrorMessage(const QString &errorMessage); // internal public for FlatModel diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 971f04259c460543a2f93d2a5c443eaf03f38ae0..cc5a102e426822e7119494d3b78bc936c2511417 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -597,7 +597,7 @@ void QmlProfilerTool::startRemoteTool(ProjectExplorer::RunConfiguration *rc) auto runControl = qobject_cast<QmlProfilerRunControl *>(createRunControl(rc)); runControl->setConnection(connection); - ProjectExplorerPlugin::startRunControl(runControl, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); + ProjectExplorerPlugin::startRunControl(runControl); } QString QmlProfilerTool::summary(const QVector<int> &typeIds) const diff --git a/src/plugins/qnx/qnxattachdebugsupport.cpp b/src/plugins/qnx/qnxattachdebugsupport.cpp index edecbc601f5af5d92ffe33b61e00d7eda79ae120..1e69983c6318b022f55ddf2793d7e052b109e9e4 100644 --- a/src/plugins/qnx/qnxattachdebugsupport.cpp +++ b/src/plugins/qnx/qnxattachdebugsupport.cpp @@ -147,7 +147,7 @@ void QnxAttachDebugSupport::attachToProcess() } connect(runControl, &Debugger::DebuggerRunControl::stateChanged, this, &QnxAttachDebugSupport::handleDebuggerStateChanged); - ProjectExplorerPlugin::startRunControl(runControl, ProjectExplorer::Constants::DEBUG_RUN_MODE); + ProjectExplorerPlugin::startRunControl(runControl); } void QnxAttachDebugSupport::handleDebuggerStateChanged(Debugger::DebuggerState state) diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp index 67dfd9b66b60e1aa803c3b4505c7649546e7119a..90c0b80486bc297d1616c0de43a508667cdfcd21 100644 --- a/src/plugins/valgrind/callgrindtool.cpp +++ b/src/plugins/valgrind/callgrindtool.cpp @@ -281,7 +281,7 @@ CallgrindTool::CallgrindTool(QObject *parent) connection.connParams = dlg.sshParams(); rc->setConnection(connection); rc->setDisplayName(runnable.executable); - ProjectExplorerPlugin::startRunControl(rc, CALLGRIND_RUN_MODE); + ProjectExplorerPlugin::startRunControl(rc); }); desc.setMenuGroup(Debugger::Constants::G_ANALYZER_REMOTE_TOOLS); Debugger::registerAction(CallgrindRemoteActionId, desc); diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index 9c3c06544cb905ff9a5d16ea09085c28e3ed78a7..6b40384dacbb16c9b8bc814b79d090427a05c1ac 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -429,7 +429,7 @@ MemcheckTool::MemcheckTool(QObject *parent) connection.connParams = dlg.sshParams(); rc->setConnection(connection); rc->setDisplayName(runnable.executable); - ProjectExplorerPlugin::startRunControl(rc, MEMCHECK_RUN_MODE); + ProjectExplorerPlugin::startRunControl(rc); }); desc.setMenuGroup(Debugger::Constants::G_ANALYZER_REMOTE_TOOLS); Debugger::registerAction("Memcheck.Remote", desc);