diff options
authorElvis Angelaccio <[email protected]>2016-04-14 10:40:55 +0200
committerElvis Angelaccio <[email protected]>2016-04-14 10:50:45 +0200
commit02d26d42d5bf50230e0b71b8bf4be201566a4f49 (patch)
parentd508d8fe48875c1ac072da7fd61fc294a540899f (diff)
part: connect to KJob::finished instead of result when registering jobs
The Part used to emit the signal ready upon receiving the KJob::result signal, on jobs completion. After commit a537c5e, the Part would not receive anymore this signal after killing a ListJob. According to the KJob docs, this is probably due to a change in the event loop behavior (due to CliInterface now being in the main thread) which cause the job to be deleted before than expected. The finished signal is always guaranteed to be emitted (upon jobs destruction), so it makes sense to use it instead, in this specific case. Task: T2225
1 files changed, 1 insertions, 1 deletions
diff --git a/part/part.cpp b/part/part.cpp
index 6a3c7af..3eb88ed 100644
--- a/part/part.cpp
+++ b/part/part.cpp
@@ -197,7 +197,7 @@ void Part::registerJob(KJob* job)
emit busy();
- connect(job, &KJob::result, this, &Part::ready);
+ connect(job, &KJob::finished, this, &Part::ready);
// TODO: KIO::mostLocalHere is used here to resolve some KIO URLs to local