Commit 8430d305 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Make sure we don't crash when stopping all jobs

Summary:
If we don't emit result, the ExecuteCompositeJob doesn't relise that
it's failing and keeps the dangling object. Calling stop all processes
would result in a crash then.

Test Plan:
* run app
* run app again
* choose to kill the first instance
* stop all processes

Reviewers: #kdevelop, mwolff

Reviewed By: #kdevelop, mwolff

Subscribers: mwolff, kdevelop-devel

Differential Revision: https://phabricator.kde.org/D10874
parent 154fcd76
......@@ -140,7 +140,7 @@ void NativeAppJob::start()
if (job && job != this && job->m_name == m_name) {
QMessageBox::StandardButton button = QMessageBox::question(nullptr, i18n("Job already running"), i18n("'%1' is already being executed. Should we kill the previous instance?", m_name));
if (button != QMessageBox::No && ICore::self()->runController()->currentJobs().contains(*it)) {
(*it)->kill();
(*it)->kill(EmitResult);
}
currentJobs = ICore::self()->runController()->currentJobs();
it = currentJobs.begin();
......
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