1. 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
      completion.
      
      Differential Revision: D1749
      41b25127
  2. 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
      268ad34f
  3. 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
      13d70a48
  4. 02 May, 2016 1 commit
    • Elvis Angelaccio's avatar
      Drop CliInterface::isCliBased() · c090e935
      Elvis Angelaccio authored
      The only reason why we needed to know whether an interface is CLI-based was to
      check whether the executables needed by the cliplugins were available.
      
      This check is now done in the Plugin class, so we can drop this function.
      c090e935
  5. 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
      GUI:
      Differential Revision: D1493
      04d56afa
  6. 23 Apr, 2016 1 commit
    • Elvis Angelaccio's avatar
      libarchive: properly stop all jobs · 8c21ca3a
      Elvis Angelaccio authored
      We use the m_abortOperation flag in the same way ListJob does (see commit
      acb455da).
      
      We also need to remove the disconnect() in the Job destructor, which makes Ark
      crash if we stop an AddToArchive job. This disconnect() looks like a relic of the
      past (see e.g. commit 15fce6f5) and doesn't seem really necessary.
      
      Note that the CliInterface jobs still need to be fixed. So do batch extract
      jobs, which are KCompositeJobs and currently ignore the kill button in the
      systray.
      
      CCBUG: 222392
      
      Differential Revision: D1466
      8c21ca3a
  7. 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
      4320f587
  8. 06 Apr, 2016 1 commit
    • Elvis Angelaccio's avatar
      Run CliInterface from the main thread · a537c5ee
      Elvis Angelaccio authored
      CLI-based plugins run their jobs in another process, so we can avoid to also
      run them in another thread. This also fixes a race condition with the unit
      tests.
      
      Differential Revision: D1229
      a537c5ee
  9. 23 Feb, 2016 4 commits
  10. 18 Nov, 2015 2 commits
  11. 27 Oct, 2015 2 commits
  12. 15 Oct, 2015 1 commit
    • Ragnar Thomsen's avatar
      Use ecm_qt_declare_logging_category() cmake macro · 5e04e640
      Ragnar Thomsen authored
      This macro was introduced in ECM 5.14.0 and generates logging category
      declarations. This removes the necessity of Q_LOGGING_CATEGORY calls in
      cpp files. A header with Q_DECLARE_LOGGING_CATEGORY is automatically
      generated, so the old logging.h file can be removed.
      
      Also the identifier is now ARK everywhere, so all qCDebug() should be
      qCDebug(ARK).
      
      This bumps the required dep version for ECM to 5.14.0.
      5e04e640
  13. 23 Sep, 2015 1 commit
  14. 10 Sep, 2015 1 commit
    • Ragnar Thomsen's avatar
      Fix drag'n'drop extraction of multiple selected archive entries · 2072d0d4
      Ragnar Thomsen authored
      This commit implements multi-selection drag'n'drop extraction. This is
      used when dragging multiple files from Ark to e.g. Dolphin for
      extraction. It's based partially on work done by Raphael in
      the multiple-dnd-selection git branch.
      
      Dragged files are extracted without path. Dragged folders are extracted
      without path, but with all folders/files beneath them
      extracted with relative path (i.e. path beneath the selected folder).
      
      A struct called FileRootNodePair is added to Kerfuffle::Archive, which
      contains two strings (the filename with path and a root node).
      A FileRootNodePair is passed for each entry to be extracted in a
      QVariantList to ArchiveModel::extractFiles(), which creates the
      ExtractJob. All children of folders are added to the QVariantList. The
      QVariantList is in turn passed to CliPlugin::copyFiles and hence
      LibArchiveInterface::copyFiles(). The latter is modified to remove the
      specific rootnode from each file when extracting.
      
      The CLI plugins, e.g. clizip and clirar, still extract with full path,
      due to not supporting individual RootNodes. However, this is a separate
      issue and should be fixed separately.
      
      BUG: 187152
      FIXED-IN: 15.08.1
      REVIEW: 124018
      2072d0d4
  15. 22 Aug, 2015 1 commit
  16. 09 Jun, 2015 1 commit
  17. 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
      KJob::KilledJobError.
      
      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
      8dd0b02a
  18. 31 May, 2015 2 commits
  19. 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.
      ee006cb6
  20. 25 May, 2015 1 commit
  21. 19 May, 2015 1 commit
  22. 18 May, 2015 1 commit
  23. 10 Nov, 2014 1 commit
  24. 14 Oct, 2014 1 commit
  25. 08 Oct, 2014 2 commits
  26. 14 May, 2014 1 commit
    • Albert Astals Cid's avatar
      Properly stop list jobs on close · acb455da
      Albert Astals Cid authored
      Track running jobs in JobTracker. On its destruction (i.e. UI is going down) we kill and delete (which waits for finishing) those jobs.
      
      Tested with very big tar.gz (libarchive plugin) and .zip (cliplugin) and it closes without crashing now
      
      Acked by rakuco
      BUGS: 193908
      FIXED-IN: 4.13.2
      REVIEW: 118108
      acb455da
  27. 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
         QObject::disconnect().
      
      All the (few) unit tests we have still pass.
      15fce6f5
  28. 13 Apr, 2012 1 commit
  29. 08 Jan, 2012 1 commit
  30. 26 Dec, 2011 1 commit
  31. 31 Jul, 2011 1 commit
  32. 19 Jul, 2011 1 commit
  33. 18 Jul, 2011 1 commit
    • Raphael Kubo da Costa's avatar
      Specify when the extraction dialog's settings should be followed. · 4d0edc91
      Raphael Kubo da Costa authored
      On ExtractJob's side, we make the extraction options it received
      publicly accessible.
      
      On Part's side, we set a "FollowExtractionDialogSettings" option to
      true only when the extraction dialog was used to extract files, and
      only actually follow these settings (for now, open the destination
      directory and/or quit Ark after the extraction) when that option is
      set.
      
      Forwardport of r1242113.
      
      CCBUG: 188857
      
      svn path=/trunk/KDE/kdeutils/ark/; revision=1242115
      4d0edc91