1. 16 Jul, 2016 3 commits
    • Ragnar Thomsen's avatar
      7472e158
    • Ragnar Thomsen's avatar
      Detect multi-volume archives and show info in PropertiesDialog · 0f4ae19b
      Ragnar Thomsen authored
      Two variables were added to ReadOnlyArchiveInterface: A boolean
      describing whether the archive is multi-volume and an int used for
      storing number of volumes. Two corresponding Q_PROPERTY's were added to
      Archive which fetch the info from ReadOnlyArchiveInterface.
      
      The detection of multi-volume archives was fixed in cli7z.
      
      The information is displayed in PropertiesDialog and will be used when
      implementing support for creating multi-volume archives.
      
      GUI:
      0f4ae19b
    • Ragnar Thomsen's avatar
      Implement a custom AddDialog · 07269ec7
      Ragnar Thomsen authored
      This diff implements an AddDialog class that is used instead of
      QFileDialogs for adding files/folders to an archive. Now both folders
      and files are added to an archive with a single action in Part, instead
      of two separate actions (Add File/Add Folder).
      
      AddDialog has a button which opens a new dialog that allows setting
      advanced compression settings (currently only compression level). Since
      compression options are used both when creating a new archive and adding
      files to an existing archive, a new class called
      CompressionOptionsWidget was created which is used by both AddDialog and
      CreateDialog.
      
      Differential Revision: D2120
      GUI:
      07269ec7
  2. 12 Jul, 2016 1 commit
    • Elvis Angelaccio's avatar
      part: switch to json loading · bce36ee9
      Elvis Angelaccio authored
      Every time we do a 'make install' we also update the mime database (because we
      install mimetypes) and this causes the ksycoca file to be regenerated the
      next time we run Ark (because we load the Part using KService).
      
      This is annoying and clutters the console output with ksycoca messages. We can use instead the new
      json loading mechanism like we already do with our plugins.
      
      Regarding ark_part.desktop, we continue to install it because Konqueror is
      probably using it.
      
      Differential Revision: D2140
      bce36ee9
  3. 10 Jul, 2016 3 commits
    • Elvis Angelaccio's avatar
      GIT_SILENT Fix AddToArchive test · 562f156a
      Elvis Angelaccio authored
      This workarounds a git limitation that doesn't allow us to add an empty
      directory in the repository.
      562f156a
    • Ragnar Thomsen's avatar
      Extend AddToArchiveTest · f3601127
      Ragnar Thomsen authored
      Check for correct number of added folders. Add tests for empty subdirs
      and folders with multiple level of subfolders.
      
      Also test the RAR format, even though we currently dont provide a
      "Compress Here (as RAR)" action in the service menu.
      f3601127
    • Ragnar Thomsen's avatar
      Add number of folders to PropertiesDialog and fix bugs · d78e151c
      Ragnar Thomsen authored
      The number of folders is now also shown in PropertiesDialog. There was a
      bug where number of files/folders and total uncompressed size didn't get
      updated after adding/deleting files from archive. This is now fixed by
      counting the files/folders and uncompressed size in
      ArchiveModel::countEntriesAndSize().
      
      BUG: 363368
      FIXED-IN: 16.08.0
      Differential Revision: D2130
      GUI:
      d78e151c
  4. 09 Jul, 2016 2 commits
    • Elvis Angelaccio's avatar
      Merge branch 'Applications/16.04' · af3ba6c2
      Elvis Angelaccio authored
      * Applications/16.04:
        Fix starting Ark from Plasma 5.7
        archivemodel: check for ListJob errors
      af3ba6c2
    • Elvis Angelaccio's avatar
      Improve checksums calculation · fefce76c
      Elvis Angelaccio authored
      Summary:
      1. Compute also the MD5 in another thread (useful if the archive is huge)
      2. Drop the member QByteArray. If the archive is huge this could be bad on
         systems with low amount of RAM. QCryptographicHash accepts a QIODevice, so we
         can just read the file three times.
      
      Differential Revision: D2123
      fefce76c
  5. 08 Jul, 2016 4 commits
  6. 07 Jul, 2016 2 commits
    • Elvis Angelaccio's avatar
      Port to kcoreaddons_add_plugin · 5d133a92
      Elvis Angelaccio authored
      We use this cmake function to install our plugins. For the kerfuffle ones, we
      also define a cmake wrapper that calls this function and also links to the
      kerfuffle library.
      
      Differential Revision: D2113
      5d133a92
    • Elvis Angelaccio's avatar
      Fix starting Ark from Plasma 5.7 · 132743e5
      Elvis Angelaccio authored
      Plasma 5.7 introduced some changes that exposed a bug in Ark, resulting in the
      app not starting when invoked from the start menu or KRunner.
      
      Dropping the X-KDE-HasTempFileOption property from the Ark .desktop file fixes
      this issue.
      
      This property was (wrongly) set in commit bc6dcce5, where Ark was ported
      away from KUniqueApplication.
      
      Thanks to Ragnar Thomsen for the bugfix.
      132743e5
  7. 05 Jul, 2016 1 commit
    • Elvis Angelaccio's avatar
      archivemodel: check for ListJob errors · 97eb1b35
      Elvis Angelaccio authored
      If a ListJob ends up with an error (e.g. job aborted due to corrupted archive),
      we should not add the listed entries in the model.
      
      BUG: 361757
      FIXED-IN: 16.04.3
      
      Differential Revision: D2082
      97eb1b35
  8. 02 Jul, 2016 1 commit
  9. 01 Jul, 2016 1 commit
  10. 28 Jun, 2016 1 commit
  11. 23 Jun, 2016 2 commits
  12. 19 Jun, 2016 1 commit
    • Ragnar Thomsen's avatar
      Add support for LZ4-compressed tar archives · 88ad5a0e
      Ragnar Thomsen authored
      The recently released libarchive 3.2.0 adds support for LZ4-compression.
      We utilize this to enable support for LZ4-compressed tarballs in
      libarchiveplugin.
      
      Libarchive requires the lz4 executable to be found in path.
      
      cmake < 3.6 is not able to detect version number of libarchive 3.2 and
      therefore LZ4-support will not be enabled for older cmake versions, even
      though libarchive 3.2 is installed.
      
      Differential Revision: D1821
      88ad5a0e
  13. 18 Jun, 2016 1 commit
  14. 13 Jun, 2016 6 commits
  15. 12 Jun, 2016 3 commits
    • Ragnar Thomsen's avatar
      Remove X-KDE-Kerfuffle-APIRevision property from desktop file · 8bbb3628
      Ragnar Thomsen authored
      The property is unused since commit a040f885.
      
      GIT_SILENT
      8bbb3628
    • Ragnar Thomsen's avatar
      Cleanup plugin json files · a040f885
      Ragnar Thomsen authored
      Remove unused fields from the plugin json files (Authors, License,
      Website and X-KDE-Kerfuffle-APIRevision). The fields have not been
      updated for ages. The license and authors information is available in
      the .cpp and .h files.
      
      The plugin version is now set to follow Ark version and gets
      auto-updated by CMake.
      
      Differential Revision: D1828
      a040f885
    • Elvis Angelaccio's avatar
      Stop hardcoding the mimetypes in the json metadata · d4755582
      Elvis Angelaccio authored
      This will allow us to configure the supported mimetypes at build time (e.g.
      depending on the libarchive version we are building against). We also don't
      need anymore the check for mimetypes in two different places.
      
      Differential Revision: D1822
      d4755582
  16. 10 Jun, 2016 2 commits
    • Elvis Angelaccio's avatar
      GIT_SILENT Update HACKING file · c347405a
      Elvis Angelaccio authored
      Better documentation about how to do a merge.
      c347405a
    • Elvis Angelaccio's avatar
      Add new jobs to preview/open a file · 41b25127
      Elvis Angelaccio authored
      The goal of task T916 is to stop disabling the Part UI while extracting an
      entry. To do so, we need first to make sure that no race condition would occur
      if extracting two or more entries in parallel.
      
      A race condition might occur in Part::slotOpenExtractedEntry(), where
      m_openFileMode is a global member that could be accessed concurrently between
      different threads. We can stop using this variable if we introduce dedicated
      jobs for preview/opening of files. This way we can simply do a dynamic_cast on
      the local job variable, to check whether the user wants to open or open-with
      the file.
      
      Preview is totally unrelated so it can be moved into a different slot. We can
      also make sure that the PreviewJob deletes the temporary directory upon
      completion.
      
      Differential Revision: D1749
      41b25127
  17. 09 Jun, 2016 2 commits
    • Elvis Angelaccio's avatar
      Merge branch 'Applications/16.04' · 3dccd031
      Elvis Angelaccio authored
      3dccd031
    • Elvis Angelaccio's avatar
      Fix crash with blocking Open dialog · 0d16e7d0
      Elvis Angelaccio authored
      `QDialog::exec()` is bad and should not be used unless strictly necessary.
      The exec() call is blocking and anything can happen before it returns to the caller.
      
      The old workaround is to use a `QPointer` to guard the dialog.
      Yet there is a crash when calling `QCoreApplication::quit()` via dbus while the dialog is open.
      
      The proper fix is to call the dialog in a non-blocking way. Nowadays this is trivial thanks to C++11 lambdas.
      
      Differential Revision: D1786
      0d16e7d0
  18. 07 Jun, 2016 1 commit
  19. 06 Jun, 2016 2 commits
  20. 05 Jun, 2016 1 commit