Commit 8b5582c4 authored by Ulf Hermann's avatar Ulf Hermann

ProjectExplorer: Rename worker dependencies to "startDependencies"

There will be stopDependencies, too, which apply when stopping the
runcontrol.

Change-Id: Id72771d28cbb6b254572c9f93db93e0d054b890f
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 376b1f32
......@@ -37,10 +37,10 @@ AndroidQmlProfilerSupport::AndroidQmlProfilerSupport(RunControl *runControl)
setDisplayName("AndroidQmlProfilerSupport");
auto runner = new AndroidRunner(runControl);
addDependency(runner);
addStartDependency(runner);
auto profiler = runControl->createWorker(runControl->runMode());
profiler->addDependency(this);
profiler->addStartDependency(this);
connect(runner, &AndroidRunner::qmlServerReady, [this, runner, profiler](const QUrl &server) {
profiler->recordData("QmlServerUrl", server);
......
......@@ -99,7 +99,7 @@ AndroidDebugSupport::AndroidDebugSupport(RunControl *runControl)
{
setDisplayName("AndroidDebugger");
m_runner = new AndroidRunner(runControl);
addDependency(m_runner);
addStartDependency(m_runner);
}
void AndroidDebugSupport::start()
......
......@@ -72,7 +72,7 @@ BareMetalDebugSupport::BareMetalDebugSupport(RunControl *runControl)
r.commandLineArguments = Utils::QtcProcess::joinArgs(p->arguments(), Utils::HostOsInfo::hostOs());
m_gdbServer = new SimpleTargetRunner(runControl);
m_gdbServer->setRunnable(r);
addDependency(m_gdbServer);
addStartDependency(m_gdbServer);
}
}
......
......@@ -394,10 +394,10 @@ IosQmlProfilerSupport::IosQmlProfilerSupport(RunControl *runControl)
m_runner = new IosRunner(runControl);
m_runner->setQmlDebugging(QmlDebug::QmlProfilerServices);
addDependency(m_runner);
addStartDependency(m_runner);
m_profiler = runControl->createWorker(runControl->runMode());
m_profiler->addDependency(this);
m_profiler->addStartDependency(this);
}
void IosQmlProfilerSupport::start()
......@@ -428,7 +428,7 @@ IosDebugSupport::IosDebugSupport(RunControl *runControl)
m_runner->setCppDebugging(isCppDebugging());
m_runner->setQmlDebugging(isQmlDebugging() ? QmlDebug::QmlDebuggerServices : QmlDebug::NoQmlDebugServices);
addDependency(m_runner);
addStartDependency(m_runner);
}
void IosDebugSupport::start()
......
......@@ -537,7 +537,7 @@ public:
RunWorker *q;
RunWorkerState state = RunWorkerState::Initialized;
QPointer<RunControl> runControl;
QList<RunWorker *> dependencies;
QList<RunWorker *> startDependencies;
QString id;
QVariantMap data;
......@@ -1455,7 +1455,7 @@ bool RunWorkerPrivate::canStart() const
{
if (state != RunWorkerState::Initialized)
return false;
for (RunWorker *worker : dependencies) {
for (RunWorker *worker : startDependencies) {
QTC_ASSERT(worker, return true);
if (worker->d->state != RunWorkerState::Done
&& worker->d->state != RunWorkerState::Running)
......@@ -1618,9 +1618,9 @@ Core::Id RunWorker::runMode() const
return d->runControl->runMode();
}
void RunWorker::addDependency(RunWorker *dependency)
void RunWorker::addStartDependency(RunWorker *dependency)
{
d->dependencies.append(dependency);
d->startDependencies.append(dependency);
}
RunControl *RunWorker::runControl() const
......
......@@ -322,7 +322,7 @@ public:
RunControl *runControl() const;
void addDependency(RunWorker *dependency);
void addStartDependency(RunWorker *dependency);
void setDisplayName(const QString &id) { setId(id); } // FIXME: Obsoleted by setId.
void setId(const QString &id);
......
......@@ -308,7 +308,7 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q
m_profiler = new QmlProfilerRunner(runControl);
m_profiler->setServerUrl(serverUrl);
m_profiler->addDependency(this);
m_profiler->addStartDependency(this);
StandardRunnable debuggee = runnable().as<StandardRunnable>();
QString arguments = QmlDebug::qmlDebugArguments(QmlDebug::QmlProfilerServices, serverUrl);
......@@ -321,7 +321,7 @@ LocalQmlProfilerSupport::LocalQmlProfilerSupport(RunControl *runControl, const Q
m_profilee = new SimpleTargetRunner(runControl);
m_profilee->setRunnable(debuggee);
addDependency(m_profilee);
addStartDependency(m_profilee);
}
void LocalQmlProfilerSupport::start()
......
......@@ -87,12 +87,12 @@ QnxQmlProfilerSupport::QnxQmlProfilerSupport(RunControl *runControl)
auto portsGatherer = new PortsGatherer(runControl);
auto debuggeeRunner = new QnxAnalyzeeRunner(runControl, portsGatherer);
debuggeeRunner->addDependency(portsGatherer);
debuggeeRunner->addStartDependency(portsGatherer);
auto slog2InfoRunner = new Slog2InfoRunner(runControl);
slog2InfoRunner->addDependency(debuggeeRunner);
slog2InfoRunner->addStartDependency(debuggeeRunner);
addDependency(slog2InfoRunner);
addStartDependency(slog2InfoRunner);
// QmlDebug::QmlOutputParser m_outputParser;
// FIXME: m_outputParser needs to be fed with application output
......
......@@ -99,12 +99,12 @@ QnxDebugSupport::QnxDebugSupport(RunControl *runControl)
m_portsGatherer->setUseQmlServer(isQmlDebugging());
auto debuggeeRunner = new QnxDebuggeeRunner(runControl, m_portsGatherer);
debuggeeRunner->addDependency(m_portsGatherer);
debuggeeRunner->addStartDependency(m_portsGatherer);
auto slog2InfoRunner = new Slog2InfoRunner(runControl);
slog2InfoRunner->addDependency(debuggeeRunner);
slog2InfoRunner->addStartDependency(debuggeeRunner);
addDependency(slog2InfoRunner);
addStartDependency(slog2InfoRunner);
}
void QnxDebugSupport::start()
......
......@@ -58,10 +58,10 @@ RemoteLinuxQmlProfilerSupport::RemoteLinuxQmlProfilerSupport(RunControl *runCont
setDisplayName("RemoteLinuxQmlProfilerSupport");
m_portsGatherer = new PortsGatherer(runControl);
addDependency(m_portsGatherer);
addStartDependency(m_portsGatherer);
m_profiler = runControl->createWorker(runControl->runMode());
m_profiler->addDependency(this);
m_profiler->addStartDependency(this);
}
void RemoteLinuxQmlProfilerSupport::start()
......@@ -102,7 +102,7 @@ RemoteLinuxPerfSupport::RemoteLinuxPerfSupport(RunControl *runControl)
.join(' ');
auto toolRunner = runControl->createWorker(runControl->runMode());
toolRunner->addDependency(this);
toolRunner->addStartDependency(this);
// connect(&m_outputGatherer, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
// this, &RemoteLinuxPerfSupport::remoteIsRunning);
......
......@@ -57,9 +57,9 @@ LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunControl *runControl)
m_portsGatherer->setUseQmlServer(isQmlDebugging());
auto gdbServer = new GdbServerRunner(runControl, m_portsGatherer);
gdbServer->addDependency(m_portsGatherer);
gdbServer->addStartDependency(m_portsGatherer);
addDependency(gdbServer);
addStartDependency(gdbServer);
RunConfiguration *runConfig = runControl->runConfiguration();
if (auto rlrc = qobject_cast<RemoteLinuxRunConfiguration *>(runConfig))
......
......@@ -97,7 +97,7 @@ MemcheckToolRunner::MemcheckToolRunner(RunControl *runControl, bool withGdb)
// We need a real address to connect to from the outside.
if (device()->type() != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE)
addDependency(new LocalAddressFinder(runControl, &m_localServerAddress));
addStartDependency(new LocalAddressFinder(runControl, &m_localServerAddress));
}
QString MemcheckToolRunner::progressTitle() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment