Commit c392d3ee authored by Ulf Hermann's avatar Ulf Hermann

ProjectExplorer: Kill dependent RunWorkers if dependencies go away

There is no point in e.g. keeping the QML profiler RunWorker going if
the process has spontaneously stopped.

Change-Id: Ifdae17231cb193fd220397fa0739a74871ceeab3
Reviewed-by: default avatarhjk <>
parent ff9e55d5
......@@ -961,6 +961,22 @@ void RunControlPrivate::onWorkerStopped(RunWorker *worker)
for (RunWorker *dependent : worker->d->stopDependencies) {
switch (dependent->d->state) {
case RunWorkerState::Done:
case RunWorkerState::Failed:
case RunWorkerState::Initialized:
dependent->d->state = RunWorkerState::Done;
debugMessage("Killing " + dependent->d->id + " as it depends on stopped " + workerId);
dependent->d->state = RunWorkerState::Stopping;
QTimer::singleShot(0, dependent, &RunWorker::initiateStop);
debugMessage("Checking whether all stopped");
bool allDone = true;
for (RunWorker *worker : m_workers) {
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