Fix threading code for libarchive jobs
AbandonedPublic

Authored by elvisangelaccio on Apr 21 2016, 2:28 PM.

Details

Reviewers
rthomsen
Summary

This patch refactors and simplifies the threading code in jobs.cpp

Our Job::Private class is not anymore a QThread, but just a worker.

We move the worker to another thread using the moveToThread function and then
we set up the needed connect()s. This seems enough to properly quit the thread
upon jobs killing.

Test Plan

Tests pass. I cannot reproduce anymore bug #222392

Diff Detail

Repository
R36 Ark
Branch
fix-threads
Lint
No Linters Available
Unit
No Unit Test Coverage
elvisangelaccio retitled this revision from to Fix threading code for libarchive jobs.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
Restricted Application added a project: Ark. · View Herald TranscriptApr 21 2016, 2:28 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript

Unfortunately this patch currently makes Ark crash if I close the main window during a running ListJob...

Autodelete also ListJobs

ListJobs are set to not autodelete themeselves in Archive::list().
This is not consistent with the other jobs and I can't see a rationale for doing that.

This seems to fix the crash when closing the main window.

elvisangelaccio abandoned this revision.Apr 23 2016, 1:26 PM

Superseded by D1466...