1. 17 Oct, 2016 5 commits
    • 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
    • Elvis Angelaccio's avatar
      Add missing Q_OBJECT macros · 8aaf9693
      Elvis Angelaccio authored
      GIT_SILENT
      8aaf9693
    • Elvis Angelaccio's avatar
      Fix possible detaching · 8080f074
      Elvis Angelaccio authored
      By using a const reference we are sure the container won't detach.
      
      GIT_SILENT
      8080f074
    • Elvis Angelaccio's avatar
      GIT_SILENT Update .reviewboardrc · 3159f771
      Elvis Angelaccio authored
      3159f771
    • Elvis Angelaccio's avatar
      Remove annoying debug line · a4535977
      Elvis Angelaccio authored
      This also shows up outside Ark, e.g. in Dolphin every time the user
      right-clicks something.
      
      GIT_SILENT
      a4535977
  2. 16 Oct, 2016 4 commits
  3. 15 Oct, 2016 3 commits
    • Elvis Angelaccio's avatar
      Use QVERIFY instead of Q_ASSERT in tests · b3a84393
      Elvis Angelaccio authored
      GIT_SILENT
      b3a84393
    • Elvis Angelaccio's avatar
      Drop testhelper code in movetest · 38e1b6a1
      Elvis Angelaccio authored
      Instead, manually define what we actually want as expected result.
      This brings the number of failures down to only four.
      38e1b6a1
    • Elvis Angelaccio's avatar
      Turn extraction/compression options into classes · 89a7b5bb
      Elvis Angelaccio authored
      Currently CompressionOptions and ExtractionOprions are both QHash typedefs,
      which means they are the same thing for the compiler.
      Currently we even pass CompressionOptions objects where ExtractionOptions objects are expected.
      Both types are changed into proper classes, so that the compiler can
      detect this class of bugs.
      
      While at it:
      
      - The default value for the `PreservePaths` option was false, now is true because it's
        the more common case.
      - The `RemoveRootNode` option was redundant, it was only used together with the
        `DragAndDrop` one.
      - The `FollowExtractionDialogSettings` was only set but never read, so we can drop it.
      
      Differential Revision: D3039
      Task: T2137
      89a7b5bb
  4. 12 Oct, 2016 2 commits
    • Elvis Angelaccio's avatar
      Fix crash when moving files with clizip · 377dfcfe
      Elvis Angelaccio authored
      Entry objects are created by the plugins, so it is wrong to delete them from other
      places. If the plugins run in the main thread, we can just set a parent
      to the entries. Otherwise (in the libarchive case) we need to manually
      delete them.
      
      Closes T3988
      
      Differential Revision: D3027
      377dfcfe
    • Elvis Angelaccio's avatar
      testhelper: stop using a global event loop object · 6d5d3ff6
      Elvis Angelaccio authored
      Using a global event loop object can only introduce unexpected side effects,
      in particular if a job emits the result signal more than once (which
      should not happen, but somehow it does with LoadJobs).
      
      GIT_SILENT
      6d5d3ff6
  5. 11 Oct, 2016 7 commits
  6. 10 Oct, 2016 4 commits
  7. 09 Oct, 2016 5 commits
    • Ragnar Thomsen's avatar
      Unittest detection of compression method · ea2e4d46
      Ragnar Thomsen authored
      Unittests for cli7z and clirar were modified to also test correct
      detection of compression method.
      ea2e4d46
    • Ragnar Thomsen's avatar
      clirar: Emit compressionMethodFound signal for unrar 3/4 · 5f79138b
      Ragnar Thomsen authored
      We should also detect compression method when using the older unrar
      versions.
      5f79138b
    • Ragnar Thomsen's avatar
      Detect compression method · 50a9f590
      Ragnar Thomsen authored
      A new property was added to Archive to store detected compression
      method(s). Currently, it's only displayed in PropertiesDialog, but the
      plan is to also use it to select a sane default compression method when
      adding files to an existing archive. Code was added to all plugins for
      detecting the compression method(s) when opening an archive and a signal
      added to ReadOnlyArchiveInterface to set the property.
      
      Many archive types support multiple compression methods in same archive,
      so the property is a QStringList.
      
      Differential Revision: D2987
      50a9f590
    • Ragnar Thomsen's avatar
      clirar: Detect error when unrar version is too old · a3921c6c
      Ragnar Thomsen authored
      Unrar 3 and 4 cannot open RAR5 archives. Currently, when opening a RAR5
      archive with these old versions there is an uncaught error message which
      ends up in the comment widget.
      
      This commit adds a check for these error messages in clirar and emits an
      error signal with a proper message.
      
      CliInterface was changed so that handleLine() passes on the boolean
      return value of readListLine() to readStdOut(). This way, we can stop
      readStdOut() from handling further lines when readListLine() returns
      false. This was needed to avoid multiple error signals being emitted.
      Previously, the return value of readListLine() was unused.
      
      Unittests were added for both unrar 3 and 4.
      
      Differential Revision: D2993
      a3921c6c
    • Elvis Angelaccio's avatar
      GIT_SILENT Fix coding style · e399dc70
      Elvis Angelaccio authored
      e399dc70
  8. 08 Oct, 2016 5 commits
  9. 07 Oct, 2016 3 commits
  10. 06 Oct, 2016 2 commits
    • Albert Astals Cid's avatar
    • Ragnar Thomsen's avatar
      Process entries while listing archives · 491f1f78
      Ragnar Thomsen authored
      When listing archives Ark currently waits until the LoadJob is done to
      process the entries. This causes a lag (>7 seconds for large archives on
      fast systems) after the LoadJob has completed until the ArchiveView is
      ready.
      
      This diff causes ArchiveModel to start processing entries while the
      LoadJob is running. This results in the view being ready <1 second after
      LoadJob completes.
      
      Differential Revision: D2948
      491f1f78