1. 25 Sep, 2020 1 commit
  2. 13 Jan, 2019 1 commit
  3. 20 Sep, 2018 1 commit
  4. 07 Mar, 2018 1 commit
  5. 08 Nov, 2017 1 commit
  6. 19 Mar, 2017 3 commits
  7. 08 Jan, 2017 1 commit
    • Elvis Angelaccio's avatar
      Properly kill AddToArchive jobs · e777831f
      Elvis Angelaccio authored
      Both AddToArchive and CreateJob are wrapper jobs, they need to implement
      doKill() and call kill() on the actual jobs that are doing the work.
      BUG: 374433
      FIXED-IN: 16.12.1
      Differential Revision: D4000
  8. 27 Nov, 2016 2 commits
    • Elvis Angelaccio's avatar
      Properly kill BatchExtract jobs · 864d77f1
      Elvis Angelaccio authored
      We need to reimplement `KJob::doKill()` both in `BatchExtract` and
      `BatchExtractJob`. In the latter class we use an enum to keep track of which
      sub-job we are running and kill it when necessary.
      Differential Revision: https://phabricator.kde.org/D3521
    • Elvis Angelaccio's avatar
      Don't show two progress bars with batch extractions · 660076c4
      Elvis Angelaccio authored
      BatchExtractJob 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 is able to report progress for
      both LoadJobs and ExtractJobs (currently only libarchive and clirar).
      Differential Revision: D3518
  9. 08 Nov, 2016 1 commit
  10. 07 Nov, 2016 2 commits
  11. 15 Oct, 2016 1 commit
    • 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
  12. 11 Oct, 2016 1 commit
  13. 05 Oct, 2016 1 commit
    • Elvis Angelaccio's avatar
      Remove unused signal · 8cb82c36
      Elvis Angelaccio authored
      Jobs directly connect the interface's error() signal to their onError()
      slot, so this signal is never used.
  14. 02 Oct, 2016 1 commit
    • Elvis Angelaccio's avatar
      Refactor archive loading · 88acd303
      Elvis Angelaccio authored
      Ark currently loads an archive by using `Archive *Archive::create()` first
      and then `ListJob *archive->list()`. If an archive property is read
      *before* list() is called, the archive is listed in the background with
      This design is responsible for a lot or problems (see T1877, T3296 and T330).
      This commit refactors ListJob in a new LoadJob class. Is not possible
      anymore to create an archive and then list() it. Instead, a LoadJob is
      started first and then the archive can be retrieved at the end of the
      Differential Revision: D2811
  15. 13 Sep, 2016 1 commit
    • Elvis Angelaccio's avatar
      Drop unused event loop code · 0fffb964
      Elvis Angelaccio authored
      The event loop in the QThread's run() method was only necessary when
      CliInterface was running in another thread, but this is no longer
      happening. This event loop does not even start because when doWork()
      returns, `result` has already been emitted, resulting in q->isRunning()
      being false.
      This also means that we can drop m_isRunning, removing a possible
      source of race conditions.
  16. 15 Aug, 2016 1 commit
  17. 22 Jul, 2016 1 commit
    • Elvis Angelaccio's avatar
      Fix preview of nested archives · 8be8fe5b
      Elvis Angelaccio authored
      The assumption that a PreviewJob can remove its temp dir when it's done (commit 41b25127)
      was wrong, at least with nested archives.
      If we remove the extracted file too soon, there is no way to preview a nested archive or,
      worse, a "double-nested" archive.
      This patch just delays the cleanup to the Part destructor.
      Differential Revision: D2265
  18. 17 Jul, 2016 1 commit
  19. 21 Jun, 2016 1 commit
  20. 10 Jun, 2016 1 commit
    • 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
      Differential Revision: D1749
  21. 06 May, 2016 1 commit
    • Elvis Angelaccio's avatar
      Make jobs parent-less · 268ad34f
      Elvis Angelaccio authored
      KJobs autodelete themselves using deleteLater(), when they are done.
      So there is no reason to have them as children of Archive.
      This fixes a crash when canceling a ListJob with header-encrypted archives
      (see task T2225).
      Differential Revision: D1525
  22. 03 May, 2016 1 commit
    • Ragnar Thomsen's avatar
      Add basic test functionality · 13d70a48
      Ragnar Thomsen authored
      Add a TestJob and associated action in Part. Test functionality is
      enabled in plugin json files, currently for clizip, clirar and cli7z.
      Test results are displayed simply as success/failure in a KMessageBox.
      Testing password-protected archives will currently result in an
      errorbox, due to these archives potentially having different passwords
      for each file and hence multiple password prompts might pop up.
      Libarchive does not support testing archives.
      FEATURE: 140492
      FIXED-IN: 16.08.0
      Differential Revision: D1516
  23. 30 Apr, 2016 1 commit
    • Ragnar Thomsen's avatar
      Add support for editing/adding archive comments · 04d56afa
      Ragnar Thomsen authored
      Support was added for editing comments in supported archive types
      (currently only RAR). A new bool was added to plugin json files
      ("SupportsWriteComment") to indicate support. A new action was added and
      is found in Archive menu. The editing of comment is done in the same
      QPlainTextEdit used to display comments before. When user modifies
      comment, a KMessageWidget pops up with a "Save" button. Actual saving of
      comment to archive is achieved by a new job type: CommentJob.
      FEATURE: 357594
      FIXED-IN: 16.08.0
      Differential Revision: D1493
  24. 16 Apr, 2016 1 commit
    • Elvis Angelaccio's avatar
      Move GlobalWorkDir logic to AddJob::doWork() · 4320f587
      Elvis Angelaccio authored
      When adding files, we now change the working dir to GlobalWorkDir at the AddJob level.
      This way is easier to restore the old working dir, and we also merge
      some duplicated code between cliinterface and libarchiveplugin.
      Differential Revision: D1369
  25. 25 Mar, 2016 1 commit
  26. 23 Feb, 2016 1 commit
    • Elvis Angelaccio's avatar
      Fix archives with single files detected as single folder · bb76f994
      Elvis Angelaccio authored
      If an archive contains only one file, there is no folder in it and
      thus is wrong to claim that it is a single folder archive.
      If the archive instead contains only one empty folder, we can and should say that it's
      single folder.
      The unit tests are updated to assert this.
  27. 18 Nov, 2015 1 commit
  28. 04 Jun, 2015 1 commit
    • Ragnar Thomsen's avatar
      Implement a cancelled() signal to fix cancellation of password dialogs · 8dd0b02a
      Ragnar Thomsen authored
      Implement a cancelled() signal in ReadOnlyArchiveInterface. This signal
      is emitted in CliInterface when the user cancels a password dialog. The
      signal is connected to a slot in Job which sets KJob::error to
      The callers (Part and BatchExtract) are modified to do nothing if the
      error code is KJob::KilledJobError when running ListJobs/ExtractJobs/
      AddJobs/DeleteJobs. This fixes an issue where the user cancels the
      "Enter password" dialog and the UI keeps being blocked and/or error
      messageboxes appear.
      BUG: 267670
      FIXED-IN: 15.07.80
      REVIEW: 123967
  29. 31 May, 2015 2 commits
  30. 30 May, 2015 1 commit
    • Ragnar Thomsen's avatar
      Implement a cancelled() signal for CliInterface · ee006cb6
      Ragnar Thomsen authored
      Add a cancelled() signal for ReadOnlyArchiveInterface and implement it
      for CliInterface. Previously, when the user tried to preview a file in a
      password-protected zip archive and then cancelled the password dialog,
      the ExtractJob would not be given a finished() signal and SetReadyGui()
      would not be triggered in the KPart leading to the UI appearing to be
      loading indefinitely. Now, finished() is called for the ExtractJob when
      the password dialog is cancelled but cancelled() is used to signal to
      the KPart not to open a viewer in this case.
  31. 25 May, 2015 1 commit
  32. 10 Dec, 2014 1 commit
    • Jan Grulich's avatar
      Rename archive.h to archive_kerfuffle.h · 00821257
      Jan Grulich authored
      This fixes build of libarchiveplugin, where we need to compile against libarchive, but including <archive.h> always
      found kerfuffle/archive.h and there is no way how to force using /usr/include/archive.h instead.
      Reviewed-by: Lukáš Tinkl
  33. 14 Oct, 2014 1 commit
  34. 19 Apr, 2012 1 commit
    • Raphael Kubo da Costa's avatar
      Get rid of the Observer class. · 15fce6f5
      Raphael Kubo da Costa authored
      I have never understood why this class was added in the first place,
      and digging through the old commit history does not help much in this
      regard.  It was mostly used as another way of doing signals and slots.
       * The calls in ArchiveInterface that called each observer method now
         just emit the signals declared in ReadOnlyArchiveInterface, and the
         observer methods in the Job classes are now slots.
       * ReadOnlyArchiveInterface::removeObserver() has been replaced with
      All the (few) unit tests we have still pass.
  35. 13 Apr, 2012 1 commit