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
      Differential Revision: D1749
  2. 09 Jun, 2016 2 commits
    • Elvis Angelaccio's avatar
      Merge branch 'Applications/16.04' · 3dccd031
      Elvis Angelaccio authored
    • 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
  3. 07 Jun, 2016 1 commit
  4. 06 Jun, 2016 2 commits
  5. 05 Jun, 2016 3 commits
    • Elvis Angelaccio's avatar
      Merge branch 'Applications/16.04' · 6f768813
      Elvis Angelaccio authored
      This adapts the patch in D1725 to our new PluginManager class.
      CCBUG: 363717
    • Elvis Angelaccio's avatar
      Fix opening of files whose mimetype inherits from a supported mimetype · 8b9cd300
      Elvis Angelaccio authored
      Before 16.04 Ark used to be able to open files whose mimetype is not directly
      registered with Ark, but inherits from a mimetype that is supported by Ark.
      Examples are .odt and .epub files that both inherits from application/zip.
      Since we don't use anymore KMimeTypeTrader (since 16.04), we need to manually
      do this check while loading our plugins.
      BUG: 363717
      FIXED-IN: 16.04.2
      Differential Revision: D1725
    • Elvis Angelaccio's avatar
      Port service menus to KFileItemAction · c369264d
      Elvis Angelaccio authored
      The Compress and Extract service menus shown in Dolphin's context menu are now
      provided by two new KFileItemAction plugins. This allows us to do a lot of
      useful checks before actually showing the actions in the context menu.
      We can also stop hardcoding the supported mimetypes for the Extract
      menu. This is actually required in order to support the Extract menu when more
      than one archive is selected. In this case Dolphin sends to the kfileitemaction
      plugins the
      generic 'application/octet-stream' mimetype, so we have to manually check
      anyway the mimetype of any given URL (to be sure that Ark supports it).
      This also paves the way to dynamically generate the service menus (e.g. based
      on some kind of user preset).
      BUG: 189177
      BUG: 268163
      FIXED-IN: 16.08.0
      CCBUG: 348582
      Differential Revision: D1761
  6. 02 Jun, 2016 3 commits
    • Elvis Angelaccio's avatar
      Cache the detected archive mimetype · 65895fc6
      Elvis Angelaccio authored
      Archive::mimeType() is frequently called (i.e. every time that in the view the selected
      entry changes), so this saves some computation and reduces the amount of noisy
      debug output.
    • Elvis Angelaccio's avatar
      Merge branch 'Applications/16.04' · f8621b09
      Elvis Angelaccio authored
      * Applications/16.04:
        Don't tell kioexec to autodelete our temp files
    • Elvis Angelaccio's avatar
      Don't tell kioexec to autodelete our temp files · 4318ac1b
      Elvis Angelaccio authored
      When opening-with an entry we currently tell kioexec to autoremove the given
      URL, but we actually remove this file in the Part destructor.
      This results in kioexec sleeping for 3 minutes and then displaying an annoying
      'about to delete <URL>' message, if Ark is started from terminal.
  7. 01 Jun, 2016 4 commits
    • Elvis Angelaccio's avatar
      Remove RootNodeSwitch leftovers · 4da52b6a
      Elvis Angelaccio authored
      This should have been part of commit 27e5167b.
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 4085e247
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
    • Elvis Angelaccio's avatar
      Fix non-resizable infopanel when symlinks have a long target · e0429552
      Elvis Angelaccio authored
      When a symbolic link points to an entry with a long filename, the infopanel
      takes almost all available horizontal space and, even worse, cannot be resized.
      This is because there is a single QLabel with a multi-line text, one of which
      is the symlink's target. This patch replaces this label with a vertical
      layout containing different labels. The targetLabel is now a KSqueezedTextLabel so
      that a long target name won't mess up anymore the infopanel size.
      BUG: 363719
      FIXED-IN: 16.08.0
      Differential Revision: D1728
    • Elvis Angelaccio's avatar
      Drop RootNode extraction option · 27e5167b
      Elvis Angelaccio authored
      We never set this option and because of this there is a lot of unused code (e.g. all the `RootNodeSwitch` stuff).
      Digging in the history, the last time that this option was set was in commit 10bc72f4.
      This means that this option is fully superseded by `fileNodeRootPair` and we can safely discard all this unused code.
      Closes T1942
      Differential Revision: D1704
  8. 31 May, 2016 3 commits
  9. 29 May, 2016 1 commit
    • Elvis Angelaccio's avatar
      Drop kerfuffle_macro.h · e7f6909b
      Elvis Angelaccio authored
      This file used to define a wrapper macro for K_PLUGIN_FACTORY,
      but nowadays we use K_PLUGIN_FACTORY_WITH_JSON.
      Closes T2118.
  10. 28 May, 2016 2 commits
  11. 27 May, 2016 3 commits
  12. 22 May, 2016 1 commit
  13. 15 May, 2016 1 commit
    • Elvis Angelaccio's avatar
      Fix i18n for edit-comment action · 6b9bc44d
      Elvis Angelaccio authored
      - add context to explain that 'Edit Comment' and 'Add Comment' are mutually
      - use 'Add Comment' as default text when no archive is loaded
  14. 08 May, 2016 1 commit
    • Michael Pyne's avatar
      Make static analyzer happy about uninit variables. · 5d10d446
      Michael Pyne authored
      Coverity complains about an index being unset (CID 1356740). While I'm
      pretty sure this is a false positive given the code path in question
      there's no performance reason not to set the index here.
      While I was at it, I also fixed a GCC warning about a separate
      "potentially uninitialized" variable. Again seems to be a false positive
      (unless an extract operation starts somehow already marked to abort) but
      fixing anyways. I chose ARCHIVE_RETRY to hint to *not* abort the
      operation if this does somehow make it into error path.
  15. 07 May, 2016 1 commit
    • Ragnar Thomsen's avatar
      Add XAR support · 5dff013d
      Ragnar Thomsen authored
      Enable read-only XAR support in libarchiveplugin. The XAR mimetype was
      added in shared-mime-info 1.6 released in February 2016, so we install
      the mimetype ourselves in case the user is running an older version than
      FEATURE: 346342
      FIXED-IN: 16.08.0
      Differential Revision: D1551
  16. 06 May, 2016 3 commits
  17. 05 May, 2016 3 commits
  18. 03 May, 2016 4 commits
    • Elvis Angelaccio's avatar
      Fix Delete action on header-encrypted archives · 7addb6b7
      Elvis Angelaccio authored
      Forward-port of cdcd6c13.
    • Elvis Angelaccio's avatar
      Fix Delete action on header-encrypted archives · cdcd6c13
      Elvis Angelaccio authored
      Ark was ignoring the password prompt, resulting in an endless DeleteJob.
      This is simply fixed by using the PasswordSwitch, like in other jobs.
    • Elvis Angelaccio's avatar
      cliinterface: rename failOperation() to killProcess() · ac2dbbac
      Elvis Angelaccio authored
      The failOperation() function is confusing, since it just calls doKill().
      We can rename it to a function that actually kills the process and
      that may or may not cause the finished() signal to be emitted.
      Differential Revision: D1521
    • 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
  19. 02 May, 2016 1 commit
    • Elvis Angelaccio's avatar
      Fix plugin loading in plugins tests · 8f652a39
      Elvis Angelaccio authored
      KPluginLoader will always find kerfuffle plugins in the system plugin path,
      even if QT_PLUGIN_PATH is set to a custom location. This means that in the
      plugins test, the loaded plugin will be the system one (because it comes later
      in the list of plugins), possibly resulting in an invalid plugin factory and a skipped test.
      This patch "gives higher priority" to the plugins found in $QT_PLUGIN_PATH,
      ignoring the one in the system path and fixing this issue.