diff --git a/src/plugins/autotest/testrunner.cpp b/src/plugins/autotest/testrunner.cpp index 846a3f81220..ee188ff647c 100644 --- a/src/plugins/autotest/testrunner.cpp +++ b/src/plugins/autotest/testrunner.cpp @@ -378,7 +378,8 @@ void TestRunner::debugTests() outputreader, &QObject::deleteLater); } - connect(this, &TestRunner::requestStopTestRun, runControl, &ProjectExplorer::RunControl::stop); + connect(this, &TestRunner::requestStopTestRun, runControl, + &ProjectExplorer::RunControl::initiateStop); connect(runControl, &ProjectExplorer::RunControl::finished, this, &TestRunner::onFinished); ProjectExplorer::ProjectExplorerPlugin::startRunControl(runControl); } diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp index 69b89109aff..9862a65a0f1 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp @@ -79,7 +79,7 @@ ClangStaticAnalyzerToolRunner::ClangStaticAnalyzerToolRunner(RunControl *runCont RunConfiguration *runConfiguration = runControl->runConfiguration(); auto tool = ClangStaticAnalyzerTool::instance(); - connect(tool->stopAction(), &QAction::triggered, runControl, &RunControl::stop); + connect(tool->stopAction(), &QAction::triggered, runControl, &RunControl::initiateStop); ProjectInfo projectInfoBeforeBuild = tool->projectInfoBeforeBuild(); QTC_ASSERT(projectInfoBeforeBuild.isValid(), return); diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index b51b238118b..79f7067104c 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -726,20 +726,10 @@ RunControl::~RunControl() void RunControl::initiateStart() { emit aboutToStart(); - start(); -} - -void RunControl::start() -{ d->initiateStart(); } void RunControl::initiateStop() -{ - stop(); -} - -void RunControl::stop() { d->initiateStop(); } diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index 891c17a57e4..cf1d5c7a9ad 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -429,8 +429,8 @@ public: RunControl(RunConfiguration *runConfiguration, Core::Id mode); ~RunControl() override; - void initiateStart(); // Calls start() asynchronously. - void initiateStop(); // Calls stop() asynchronously. + void initiateStart(); + void initiateStop(); bool promptToStop(bool *optionalPrompt = nullptr) const; void setPromptToStop(const std::function &promptToStop); @@ -478,9 +478,6 @@ public: const QString &cancelButtonText = QString(), bool *prompt = nullptr); - virtual void start(); - virtual void stop(); - using WorkerCreator = std::function; static void registerWorkerCreator(Core::Id id, const WorkerCreator &workerCreator); RunWorker *workerById(Core::Id id) const; diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index 4525b72e11e..f1dd71224f3 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -102,7 +102,7 @@ QmlProfilerRunner::QmlProfilerRunner(RunControl *runControl) QmlProfilerRunner::~QmlProfilerRunner() { if (runControl()->isRunning() && d->m_profilerState) - runControl()->stop(); + runControl()->initiateStop(); delete d; } diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index bad4c79ee48..b661fab197f 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -342,10 +342,10 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker) connect(runControl, &RunControl::finished, this, [this, runControl] { d->m_toolBusy = false; updateRunActions(); - disconnect(d->m_stopAction, &QAction::triggered, runControl, &RunControl::stop); + disconnect(d->m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop); }); - connect(d->m_stopAction, &QAction::triggered, runControl, &RunControl::stop); + connect(d->m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop); updateRunActions(); runWorker->registerProfilerStateManager(d->m_profilerState); diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp index c93a406c900..1564fcb78d0 100644 --- a/src/plugins/valgrind/callgrindtool.cpp +++ b/src/plugins/valgrind/callgrindtool.cpp @@ -752,7 +752,7 @@ ValgrindToolRunner *CallgrindTool::createRunTool(RunControl *runControl) connect(this, &CallgrindTool::resetRequested, toolRunner, &CallgrindToolRunner::reset); connect(this, &CallgrindTool::pauseToggled, toolRunner, &CallgrindToolRunner::setPaused); - connect(m_stopAction, &QAction::triggered, toolRunner, [runControl] { runControl->stop(); }); + connect(m_stopAction, &QAction::triggered, toolRunner, [runControl] { runControl->initiateStop(); }); // initialize run control toolRunner->setPaused(m_pauseAction->isChecked()); diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index e6c70188340..5ae5bf3f152 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -567,7 +567,7 @@ RunWorker *MemcheckTool::createRunWorker(RunControl *runControl) connect(runTool, &MemcheckToolRunner::internalParserError, this, &MemcheckTool::internalParserError); connect(runTool, &MemcheckToolRunner::stopped, this, &MemcheckTool::engineFinished); - connect(m_stopAction, &QAction::triggered, runControl, &RunControl::stop); + connect(m_stopAction, &QAction::triggered, runControl, &RunControl::initiateStop); m_toolBusy = true; updateRunActions();