• Ragnar Thomsen's avatar
    Show progress in percentage for all job types in LibarchivePlugin · ef1753b4
    Ragnar Thomsen authored
    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
    ef1753b4
jobs.cpp 22.1 KB