forked from qt-creator/qt-creator
ProjectExplorer: Rename some RunControl functions
Change-Id: Ia86a50100ddfd465d548863ae8d58033a5dbafc0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -635,7 +635,7 @@ void TestRunner::debugTests()
|
||||
}
|
||||
|
||||
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
runControl->setRunConfiguration(config->runConfiguration());
|
||||
runControl->copyDataFromRunConfiguration(config->runConfiguration());
|
||||
|
||||
QStringList omitted;
|
||||
Runnable inferior = config->runnable();
|
||||
|
@@ -2388,7 +2388,7 @@ void DebuggerUnitTests::testStateMachine()
|
||||
QVERIFY(rc);
|
||||
|
||||
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
runControl->setRunConfiguration(rc);
|
||||
runControl->copyDataFromRunConfiguration(rc);
|
||||
auto debugger = new DebuggerRunTool(runControl);
|
||||
|
||||
debugger->setInferior(rc->runnable());
|
||||
|
@@ -584,7 +584,7 @@ void DebuggerRunTool::start()
|
||||
|
||||
connect(m_engine, &DebuggerEngine::attachToCoreRequested, this, [this](const QString &coreFile) {
|
||||
auto rc = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
rc->copyFromRunControl(runControl());
|
||||
rc->copyDataFromRunControl(runControl());
|
||||
auto name = QString(tr("%1 - Snapshot %2").arg(runControl()->displayName()).arg(++d->snapshotCounter));
|
||||
auto debugger = new DebuggerRunTool(rc);
|
||||
debugger->setStartMode(AttachToCore);
|
||||
|
@@ -2732,7 +2732,7 @@ void ProjectExplorerPluginPrivate::executeRunConfiguration(RunConfiguration *run
|
||||
}
|
||||
|
||||
auto runControl = new RunControl(runMode);
|
||||
runControl->setRunConfiguration(runConfiguration);
|
||||
runControl->copyDataFromRunConfiguration(runConfiguration);
|
||||
|
||||
// A user needed interaction may have cancelled the run
|
||||
// (by example asking for a process pid or server url).
|
||||
|
@@ -389,13 +389,13 @@ RunControl::RunControl(Utils::Id mode) :
|
||||
{
|
||||
}
|
||||
|
||||
void RunControl::copyFromRunControl(RunControl *runControl)
|
||||
void RunControl::copyDataFromRunControl(RunControl *runControl)
|
||||
{
|
||||
QTC_ASSERT(runControl, return);
|
||||
d->copyData(runControl->d.get());
|
||||
}
|
||||
|
||||
void RunControl::setRunConfiguration(RunConfiguration *runConfig)
|
||||
void RunControl::copyDataFromRunConfiguration(RunConfiguration *runConfig)
|
||||
{
|
||||
QTC_ASSERT(runConfig, return);
|
||||
d->runConfigId = runConfig->id();
|
||||
|
@@ -193,11 +193,11 @@ public:
|
||||
explicit RunControl(Utils::Id mode);
|
||||
~RunControl() override;
|
||||
|
||||
void setRunConfiguration(RunConfiguration *runConfig);
|
||||
void setTarget(Target *target);
|
||||
void setKit(Kit *kit);
|
||||
|
||||
void copyFromRunControl(RunControl *runControl);
|
||||
void copyDataFromRunConfiguration(RunConfiguration *runConfig);
|
||||
void copyDataFromRunControl(RunControl *runControl);
|
||||
|
||||
void initiateStart();
|
||||
void initiateReStart();
|
||||
|
@@ -82,7 +82,7 @@ QmlPreviewRunner::QmlPreviewRunner(const QmlPreviewRunnerSetting &settings)
|
||||
|
||||
this->connect(runControl(), &ProjectExplorer::RunControl::stopped, [this]() {
|
||||
auto rc = new ProjectExplorer::RunControl(ProjectExplorer::Constants::QML_PREVIEW_RUN_MODE);
|
||||
rc->copyFromRunControl(runControl());
|
||||
rc->copyDataFromRunControl(runControl());
|
||||
ProjectExplorer::ProjectExplorerPlugin::startRunControl(rc);
|
||||
});
|
||||
|
||||
|
@@ -564,7 +564,7 @@ ProjectExplorer::RunControl *QmlProfilerTool::attachToWaitingApplication()
|
||||
d->m_viewContainer->perspective()->select();
|
||||
|
||||
auto runControl = new RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
|
||||
runControl->setRunConfiguration(SessionManager::startupRunConfiguration());
|
||||
runControl->copyDataFromRunConfiguration(SessionManager::startupRunConfiguration());
|
||||
auto profiler = new QmlProfilerRunner(runControl);
|
||||
profiler->setServerUrl(serverUrl);
|
||||
|
||||
|
@@ -253,7 +253,7 @@ void QnxAttachDebugSupport::showProcessesDialog()
|
||||
}
|
||||
|
||||
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
runControl->setRunConfiguration(runConfig);
|
||||
runControl->copyDataFromRunConfiguration(runConfig);
|
||||
auto debugger = new QnxAttachDebugSupport(runControl);
|
||||
debugger->setStartMode(AttachToRemoteServer);
|
||||
debugger->setCloseMode(DetachAtClose);
|
||||
|
@@ -283,7 +283,7 @@ CallgrindToolPrivate::CallgrindToolPrivate()
|
||||
return;
|
||||
m_perspective.select();
|
||||
auto runControl = new RunControl(CALLGRIND_RUN_MODE);
|
||||
runControl->setRunConfiguration(runConfig);
|
||||
runControl->copyDataFromRunConfiguration(runConfig);
|
||||
runControl->createMainWorker();
|
||||
const auto runnable = dlg.runnable();
|
||||
runControl->setRunnable(runnable);
|
||||
|
@@ -709,7 +709,7 @@ MemcheckToolPrivate::MemcheckToolPrivate()
|
||||
TaskHub::clearTasks(Debugger::Constants::ANALYZERTASK_ID);
|
||||
m_perspective.select();
|
||||
RunControl *rc = new RunControl(MEMCHECK_RUN_MODE);
|
||||
rc->setRunConfiguration(runConfig);
|
||||
rc->copyDataFromRunConfiguration(runConfig);
|
||||
rc->createMainWorker();
|
||||
const auto runnable = dlg.runnable();
|
||||
rc->setRunnable(runnable);
|
||||
|
Reference in New Issue
Block a user