BatchExtractJob: fix percentage computation
ClosedPublic

Authored by elvisangelaccio on Nov 26 2016, 5:27 PM.

Details

Summary

This job runs a LoadJob first and an ExtractJob after, which results in two
different progress bars in the notification tray. This patch changes how the
percentage is computed: the first 50% is from the LoadJob, the 2nd 50% from the
ExtractJob. This ensures that only one progress bar shows up while the wrapper job
is running. This will only work if the interface reports progress for both LoadJobs and ExtractJobs.

Test Plan

Batch-extract the linux tarball and check the system tray notifications.

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio retitled this revision from to BatchExtractJob: fix percentage computation.
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 TranscriptNov 26 2016, 5:27 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
rthomsen edited edge metadata.Nov 26 2016, 7:19 PM

This works when both LoadJob and ExtractJob emit progress (e.g. libarchiveplugni). However, some cliplugins e.g. cli7z only emit progress when loading and not when extracting. This leads to the progress bar stalling at 50% until completion of the extractjob.

elvisangelaccio edited edge metadata.
  • Check if the interface actually supports progress reporting for BatchExtractJobs
rthomsen accepted this revision.Nov 27 2016, 11:05 AM
rthomsen edited edge metadata.
This revision is now accepted and ready to land.Nov 27 2016, 11:05 AM