| 704 | } |
| 705 | |
| 706 | void KDevelop::RunController::stopAllProcesses() |
| 707 | { |
| 708 | Q_D(RunController); |
| 709 | |
| 710 | // composite jobs might remove child jobs, see also: |
| 711 | // https://bugs.kde.org/show_bug.cgi?id=258904 |
| 712 | const auto jobs = d->jobs.keys(); |
| 713 | for (KJob* job : jobs) { |
| 714 | // now we check the real list whether it was deleted |
| 715 | if (!d->jobs.contains(job)) |
| 716 | continue; |
| 717 | if (job->capabilities() & KJob::Killable) { |
| 718 | job->kill(KJob::EmitResult); |
| 719 | } else { |
| 720 | qCWarning(SHELL) << "cannot stop non-killable job: " << job; |
| 721 | } |
| 722 | } |
| 723 | } |
| 724 | |
| 725 | void KDevelop::RunController::slotKillJob() |
| 726 | { |