1. 25 Sep, 2020 1 commit
  2. 14 Mar, 2020 1 commit
    • Nicolas Fella's avatar
      Lazily load file entry icons · 2c684ecd
      Nicolas Fella authored
      Summary:
      Building the icons datastructure is the most significant bottleneck when opening large archives. Knowing all the icons at loading time is unnecessary since most elements won't be visible anyway.
      This patch moves the icon storing into the Entry class where it is lazily determined the first time it is accessed. This improves the initial archive loading time significantly.
      
      Test Plan: It's hard to give exact numbers, but my main test archive (the Android NDK) went from ~3 seconds to load to "pretty much instant"
      
      Reviewers: #ark, elvisangelaccio
      
      Reviewed By: #ark, elvisangelaccio
      
      Subscribers: broulik, kde-utils-devel
      
      Tags: #ark
      
      Differential Revision: https://phabricator.kde.org/D26357
      2c684ecd
  3. 24 Sep, 2019 1 commit
  4. 28 Jul, 2019 1 commit
    • Natsumi Higa's avatar
      Display BLAKE2 file checksums for RAR files · afdf8f26
      Natsumi Higa authored
      Summary: When creating a RAR 5.0 archive, BLAKE2sp can be used instead of CRC32 for file checksums. This diff adds an entry for BLAKE2 file checksum.
      
      Test Plan:
      Attached is a RAR 5.0 archive using BLAKE2sp file checksums.
      
      {F6875541}
      
      Reviewers: #ark, elvisangelaccio
      
      Subscribers: #ark, kde-utils-devel
      
      Tags: #ark
      
      Differential Revision: https://phabricator.kde.org/D21637
      afdf8f26
  5. 12 May, 2019 1 commit
    • Ragnar Thomsen's avatar
      Get columns to show from first file entry · 3ad7526b
      Ragnar Thomsen authored
      Currently, we use the first entry in an archive to determine which
      columns to show. If the first entry happens to be a directory, then all
      relevant columns might not be shown.
      
      Make sure we always check the first file entry for columns to
      show.
      
      BUG: 406135
      FIXED-IN: 19.04.2
      Differential Revision: D20683
      3ad7526b
  6. 20 Sep, 2018 1 commit
  7. 17 Jul, 2018 1 commit
    • Elvis Angelaccio's avatar
      Stop ignoring compression options when dropping files · 20c6faa5
      Elvis Angelaccio authored
      Compression options set by CreateDialog were only taken into account
      when adding files through the AddDialog, but not when adding files by
      dropping them from Dolphin.
      
      We fix this issue by moving the init of compression options in a new
      dedicated function, which we can call also when dropping files.
      
      While at it, this change allows us to simplify the `droppedFiles()`
      signal emitted by ArchiveModel.
      
      BUG: 396579
      FIXED-IN: 18.07.80
      20c6faa5
  8. 19 Mar, 2017 3 commits
  9. 22 Dec, 2016 1 commit
    • Elvis Angelaccio's avatar
      Simplify count of children in entries · 4f238829
      Elvis Angelaccio authored
      childrenCount() was called only after we already retrieved the entry
      from the index. This means that this function has nothing to do with the
      model and can be moved to Archive::Entry.
      4f238829
  10. 19 Dec, 2016 1 commit
    • Ragnar Thomsen's avatar
      Fix sorting in QTreeView · 206a5eee
      Ragnar Thomsen authored
      Commit 7781d6ef broke sorting in the sense that folders are no
      longer sorted before files. This is due to KRecursiveFilterProxyModel's
      implementation of sort() being used instead of ArchiveModel's.
      
      We now subclass KRecursiveFilterProxyModel into ArchiveFilterSortModel
      so we can re-implement lessThan() and move the relevant code from
      ArchiveModel::sort().
      
      Differential Revision: D3742
      206a5eee
  11. 08 Nov, 2016 1 commit
    • Elvis Angelaccio's avatar
      archivemodel: drop global static map · e03d534d
      Elvis Angelaccio authored
      Make it a class member instead. This is now possible since we no longer
      have the ArchiveModelSorter class. While at it, use directly QByteArray
      instead of converting from QString.
      
      Differential Revision: D3272
      e03d534d
  12. 12 Oct, 2016 1 commit
    • 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
  13. 11 Oct, 2016 1 commit
  14. 06 Oct, 2016 1 commit
    • 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
  15. 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
      listIfNotListed().
      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
      job.
      
      Differential Revision: D2811
      88acd303
  16. 15 Aug, 2016 1 commit
  17. 23 Jul, 2016 1 commit
    • Ragnar Thomsen's avatar
      Fix handling of drag'n'drop adding files to archives · d56aabf4
      Ragnar Thomsen authored
      Multi-volume archives are set to read-only (only when non-empty) in
      Archive class. This is needed because rar and 7z don't support modifying
      such archives.
      Also, a KMessageWidget is now shown when user drags files to a read-only
      archive or an encrypted archive when password is unknown.
      
      Unfortunately, we cant set encrypted archives with unknown password to
      read-only, because we still want to support deleting files from them.
      
      Differential Revision: D2274
      d56aabf4
  18. 17 Jul, 2016 1 commit
  19. 10 Jul, 2016 1 commit
    • 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
  20. 21 Jun, 2016 1 commit
  21. 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
  22. 12 Mar, 2016 2 commits
    • Elvis Angelaccio's avatar
      Don't list non-existing archives · 496b7686
      Elvis Angelaccio authored
      This issue was supposed to be fixed by commit e5fcaedc,
      but actually that patch only addressed the Archive::list() issued by the Part/ArchiveModel.
      
      This patch generalizes the check for the "private" Archive::list() calls as well.
      
      This slightly changes the expected values in the unit test for the properties of
      a non-existing archive.
      
      Differential Revision: D1133
      496b7686
    • Elvis Angelaccio's avatar
      Improve password-protection status in the properties dialog · 2dd4b816
      Elvis Angelaccio authored
      An archive could be just password-protected but also header-encrypted.
      This is now displayed to the user in the properties dialog.
      
      Differential Revision: D1124
      2dd4b816
  23. 02 Jan, 2016 1 commit
    • Elvis Angelaccio's avatar
      Don't run a ListJob when creating a new archive · e5fcaedc
      Elvis Angelaccio authored
      Currently if we create a new archive using the New action, Ark creates a
      ListJob which is obviously going to fail, since the archive does not exist yet.
      Previously Ark would just ignore such failing jobs, but with Ark 15.12 the
      clirar plugin actually parses the error message of unrar as a valid comment.
      
      We can solve the problem at the root and only run a ListJob if the archive to
      be listed actually exists.
      
      Differential Revision: D712
      e5fcaedc
  24. 18 Nov, 2015 1 commit
  25. 22 Jul, 2015 1 commit
    • Elvis Angelaccio's avatar
      Create password-protected archives with Ark · 402bbe84
      Elvis Angelaccio authored
      This feature allows Ark to create a password-protected archive from
      scratch.
      The 7z and rar plugins support both header encryption and entries-only
      encryption, while the zip one supports only the latter.
      
      An encrypted archive can be created through the CreateDialog (within Ark) or
      through the AddDialog (from e.g. Dolphin).
      
      REVIEW: 120204
      FEATURE: 253694
      FIXED-IN: 15.08
      GUI:
      402bbe84
  26. 26 Dec, 2014 1 commit
  27. 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
      00821257
  28. 14 Oct, 2014 1 commit
  29. 26 Aug, 2012 1 commit
    • Raphael Kubo da Costa's avatar
      Use a different D-Bus object path for each Ark::Part. · c79d8db2
      Raphael Kubo da Costa authored
      So far, all Ark::Part instances used the same D-Bus object path,
      "/DndExtract", to receive drag'n'drop notifications.
      
      This does not work correctly ever since we started supporting using Ark as
      an embedded KPart (for previewing archived inside Konqueror or Rekonq, for
      example). In this case, the object path is added to the embedder (the
      `konqueror-5654' service, for example). If one previews multiple archives in
      different tabs, multiple calls to QDBusConnection::registerObject() will be
      made and only the first one will succeed, since we are always trying to
      register the same path.
      
      Fixing this involves touching separate parts of the code:
      
       o Use a different object path for each KPart instance, just like
         KateDocument or nsplugin do. We do this by keeping a static counter that
         is incremented each time a KPart is created and is part of the path name.
      
       o Use other, more specific mime types for the data we send when dragging
         out of Ark. So far we used "application/x-kde-dndextract" and passed the
         D-Bus service as its value. We now pass this value in the newly-created
         "application/x-kde-ark-dndextract-service" mime type, and the object
         path, which is now passed to ArchiveModel, in
         "application/x-kde-ark-dndextract-path".
      
       o Also use a more specific interface name in the XML file. While here,
         generate the .cpp and .h files with CMake instead of keeping these
         auto-generated files around for no purpose.
      
       o ArchiveModel::mimeTypes() has been adjusted to indicate the mime types we
         actually use on drag'n'drop. The previous list was mostly bogus, as we
         only use the mime types indicated above.
      
      As it can be seen, applications which support drag'n'drop from Ark also need
      to be adjusted to use the new D-Bus interface. Currently, the applications
      are Dolphin, the Folderview plasmoid and a Stack Folder plasmoid in
      playground. They are all going to be updated accordingly in tandem with this
      commit to both KDE/4.9 and master. Users using SVN/git directly might
      experience some trouble if they update one part but not the other, but there
      is not much we can do in this case.
      
      BUG:		304860
      FIXED-IN:	4.9.1
      c79d8db2
  30. 27 Dec, 2011 1 commit
    • Raphael Kubo da Costa's avatar
      Use a QScopedPointer to keep only one Archive instance alive at a time. · 8a3e5d96
      Raphael Kubo da Costa authored
      Even though having more than one Archive instance around is harmless, it
      wastes resources with no purpose.
      
      We thus guard the Archive pointer in Part::openFile() with a
      QScopedPointer so that if one is trying to create an archive whose type
      is read-only for Ark (ie. .gz files) and then chooses another mimetype,
      the first created instance is deleted right away, and not when
      ArchiveModel is destroyed.
      
      ArchiveModel::m_archive is now also a QScopedPointer, so that we do not
      need to manually delete the current archive when
      ArchiveModel::setArchive() is called.
      8a3e5d96
  31. 02 Jan, 2011 2 commits
    • Raphael Kubo da Costa's avatar
      Show the number of items directly under a subdirectory. · dc721717
      Raphael Kubo da Costa authored
      The "Size" column in the archive listing now shows the number of
      directories and files directly under a given directory. The info panel
      now shows the same information too.
      
      Patch by Ghislain Mary <gmary AT lunacymaze DOT org>, thanks a lot!
      
      FEATURE: 252923
      BUG: 252923
      FIXED-IN: 4.7.0
      
      svn path=/trunk/KDE/kdeutils/ark/; revision=1210921
      dc721717
    • Laurent Montel's avatar
      Remove not used variable · 4b4594b4
      Laurent Montel authored
      Don't check pointer before remove it
      
      svn path=/trunk/KDE/kdeutils/ark/; revision=1210910
      4b4594b4
  32. 31 Aug, 2010 1 commit
    • Raphael Kubo da Costa's avatar
      Fix constness of extractFile() parameters in the header file. · de71d695
      Raphael Kubo da Costa authored
      'options' is a const parameter in archivemodel.cpp, and should be so in
      the header declaration as well.
      
      This should fix compilation with Sun Studio.
      
      Patch by tropikhajma AT gmail.com, thanks!
      
      Forward-port of r1170166.
      
      CCBUG: 249552
      
      svn path=/trunk/KDE/kdeutils/ark/; revision=1170167
      de71d695
  33. 13 Apr, 2010 1 commit
    • Raphael Kubo da Costa's avatar
      Clean up Kerfuffle a little. · c24f030a
      Raphael Kubo da Costa authored
      Move BatchExtract to app, as it does not really look like
      library code, but rather application code.
      
      This, on its turn, made it sometimes necessary to fix some
      forward declarations and also made me optimize some others.
      
      svn path=/trunk/KDE/kdeutils/ark/; revision=1114210
      c24f030a
  34. 27 Jul, 2009 3 commits