Diffusion Ark ef1753b4b3b0

Show progress in percentage for all job types in LibarchivePlugin

Authored by rthomsen on Oct 17 2016, 5:28 PM.

Description

Show progress in percentage for all job types in LibarchivePlugin

Progress is now also shown in percentage for Addjob, CopyJob, DeleteJob
and MoveJob for archives handled by LibarchivePlugin. This was a bit
tricky due to libarchive always iterating the whole archive and means
that the plugin needs to know the total number of existing archive
entries.

A new member variable m_numberOfEntries was added to
ReadOnlyArchiveInterface, which holds the total number of entries in the
archive. The variable is kept up-to-date by incrementing/decrementing it
whenever the entry and entryRemoved signals are emitted by a plugin.
This necessitated a slight rework of the handling of MoveJob and CopyJob
by LibarchivePlugin because these emitted entry when iterating over the
old entries. The new approach should also be more efficient.

The two Archive members m_numberOfFiles and m_numberOfFolders were
removed.

ReadOnlyArchiveInterface::addFiles() got an additional argument of type
uint that holds the number of entries to be added.

Differential Revision: D3072

Details

Committed
rthomsenOct 17 2016, 5:29 PM
Differential Revision
D3072: Show progress in percentage for all job types in LibarchivePlugin
Parents
R36:8aaf969355a7: Add missing Q_OBJECT macros
Branches
Unknown
Tags
Unknown