- 25 Sep, 2020 1 commit
-
-
Laurent Montel authored
-
- 19 Jun, 2019 1 commit
-
-
Laurent Montel authored
-
- 01 Jun, 2019 1 commit
-
-
Laurent Montel authored
Summary: Port to for(...:...) Reviewers: elvisangelaccio Reviewed By: elvisangelaccio Subscribers: kde-utils-devel, #ark Tags: #ark Differential Revision: https://phabricator.kde.org/D21515
-
- 18 Sep, 2018 1 commit
-
-
Yuri Chornoivan authored
-
- 19 Mar, 2017 2 commits
-
-
Elvis Angelaccio authored
Path generated by: git grep -l 'Q_NULLPTR' | xargs sed -i 's/Q_NULLPTR/nullptr/g'
-
Elvis Angelaccio authored
Patch generated by: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. run-clang-tidy.py -header-filter='.*' -checks='-*,modernize-use-nullptr' -fix
-
- 29 Dec, 2016 2 commits
-
-
Elvis Angelaccio authored
An archive has more than one top-level entry when it's neither single-file nor single-folder.
-
Elvis Angelaccio authored
An archive is single-file if contains only one file. The Archive class only holds its numberOfEntries() but it doesn't know if they are files or folders. However, if there is only one entry and isSingleFolder() is false, that entry must be a file. This is ensured by the expanded loadtest.
-
- 22 Dec, 2016 1 commit
-
-
Elvis Angelaccio authored
GIT_SILENT
-
- 02 Dec, 2016 1 commit
-
-
Elvis Angelaccio authored
Use them only when actually required, e.g. for part's interface.h in the app/ subfolder. This also prevents the usage of the unconsistent "kerfuffle/" prefix in the includes.
-
- 08 Nov, 2016 1 commit
-
-
Ragnar Thomsen authored
Needed infrastructure changes were done in ArchiveFormat, CliProperties and other classes. A combobox was added to CreateDialog which enables setting the encryption method. Currently, only the Zip format when using cli7z supports multiple encryption methods. For other formats that support only one encryption method, the method is shown in the combobox. This diff also enables detection of encryption method when opening archives which is then shown in PropertiesDialog. To this end a new signal was added to ReadOnlyArchiveInterface (encryptionMethodFound). The similar compressionMethodFound signal was modified to only take one string instead of QStringList. Differential Revision: D3303 GUI:
-
- 07 Nov, 2016 2 commits
-
-
Elvis Angelaccio authored
GIT_SILENT
-
Elvis Angelaccio authored
GIT_SILENT
-
- 04 Nov, 2016 1 commit
-
-
Ragnar Thomsen authored
CliInterface is refactored to be more simple. A new class CliProperties is added which holds all the commands, switches and regex's for the cli executables. Alot of code is moved from CliInterface to the new class. Two new member variables are added to ReadOnlyArchiveInterface of types QMimeType and KPluginMetaData. These are passed to CliProperties which it uses to call ArchiveFormat::fromMetadata() so it can check archive format properties. The KPluginMetaData is passed from Archive to ReadOnlyArchiveInterface as the second item in the args QVariantList. CompressionMethods provided in the plugin json files was changed from a QStringList to a QVariantMap so it can hold pairs of values: One user- visible string and one value for the cli-switch. Differential Revision: D3235
-
- 17 Oct, 2016 1 commit
-
-
Ragnar Thomsen authored
Progress is now also shown in percentage for Addjob, CopyJob, DeleteJob and MoveJob for archives handled by LibarchivePlugin. This was a bit tricky due to libarchive always iterating the whole archive and means that the plugin needs to know the total number of existing archive entries. A new member variable m_numberOfEntries was added to ReadOnlyArchiveInterface, which holds the total number of entries in the archive. The variable is kept up-to-date by incrementing/decrementing it whenever the entry and entryRemoved signals are emitted by a plugin. This necessitated a slight rework of the handling of MoveJob and CopyJob by LibarchivePlugin because these emitted entry when iterating over the old entries. The new approach should also be more efficient. The two Archive members m_numberOfFiles and m_numberOfFolders were removed. ReadOnlyArchiveInterface::addFiles() got an additional argument of type uint that holds the number of entries to be added. Differential Revision: D3072
-
- 15 Oct, 2016 2 commits
-
-
Elvis Angelaccio authored
Instead, manually define what we actually want as expected result. This brings the number of failures down to only four.
-
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
-
- 11 Oct, 2016 1 commit
-
-
Elvis Angelaccio authored
We never prepend to QList, so there is no reason for not using the more efficient QVector.
-
- 09 Oct, 2016 1 commit
-
-
Ragnar Thomsen authored
A new property was added to Archive to store detected compression method(s). Currently, it's only displayed in PropertiesDialog, but the plan is to also use it to select a sane default compression method when adding files to an existing archive. Code was added to all plugins for detecting the compression method(s) when opening an archive and a signal added to ReadOnlyArchiveInterface to set the property. Many archive types support multiple compression methods in same archive, so the property is a QStringList. Differential Revision: D2987
-
- 02 Oct, 2016 1 commit
-
-
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
-
- 15 Aug, 2016 1 commit
-
-
Vladyslav Batyrenko authored
See: https://phabricator.kde.org/T917
-
- 09 Aug, 2016 1 commit
-
-
Ragnar Thomsen authored
Don't output entire list of files, but number of files instead.
-
- 01 Aug, 2016 2 commits
-
-
Elvis Angelaccio authored
This hack is conceptually wrong, but it's guaranteed to work since we set the problematic flag m_hasBeenListed before the ListJob starts. Task: T3296
-
Elvis Angelaccio authored
This reverts commit 23424950. The workaround was only half-working. Since commit 33928e42 Archive::isMultiVolume() calls listIfNotListed(), and this causes again an endless loop of list jobs after adding afile to an archive. Task: T3296
-
- 29 Jul, 2016 1 commit
-
-
Ragnar Thomsen authored
We test two additional properties in testProperties: isMultiVolume and numberOfVolumes. These properties are only correct after listing an archive so we now call listIfNotListed() in isMultiVolume(). This change required isMultiVolume() and isReadOnly() to be made non-const. The testcases revealed a bug in Archive::completeBaseName(), where the basename was not generated correctly for multi-volume archives. This is also fixed now. Differential Revision: D2291
-
- 23 Jul, 2016 3 commits
-
-
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
-
Elvis Angelaccio authored
There is a race condition when ListJob emits the result signal. Both ArchiveModel::slotLoadingFinished() and Archive::onListFinished() are connected to this signal. But the former triggers a chain of calls that ends up calling properties of Archive that are set by the concurrent Archive::onListFinished(). An example is Archive::encryptionType() called by Part::updateActions(). This results in an endless chain of ListJob instances. This patch is only a temporary workaround for the upcoming 16.08 stable release, since there is no time to test and merge a proper fix (see T3300) Differential Revision: D2272 Task: T3296
-
Elvis Angelaccio authored
-
- 21 Jul, 2016 1 commit
-
-
Ragnar Thomsen authored
Support for creating multi-volume rar, 7z and zip archives was implemented. A QDoubleSpinBox was added to CompressionOptionsWidget which allows setting the volume size in megabytes between 0.1 to 1000. The size in megabytes is converted by CompressionOptionsWidget to kilobytes because 7z doesn't support volume sizes with decimals. Creating a multi-volume archive changes the archive name (name.part1.rar, name.7z.001, name.zip.001) so we need to re-open the archive (the first volume) after adding files. We only support adding files once, so add/delete actions are disabled in Part if archive is multi-volume and non-empty. FEATURE: 124180 FIXED-IN: 16.08.0 Differential Revision: D2194 GUI:
-
- 19 Jul, 2016 1 commit
-
-
Ragnar Thomsen authored
We don't know the password after opening a non-header-encrypted password-protected archive. If adding files to such an archive the newly added files will be unencrypted with no warning to the user and the resulting archive will be a mixture of encrypted/unencrypted files. This commit disables adding files to such archives and gives an explanation in the tooltip for the add files action. Differential Revision: D2196
-
- 17 Jul, 2016 1 commit
-
-
Vladyslav Batyrenko authored
- Refactor fileRootNodePair into Archive::Entry - Make ArchiveInterface API receive Archive::Entry See: https://phabricator.kde.org/T2566
-
- 16 Jul, 2016 2 commits
-
-
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:
-
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:
-
- 10 Jul, 2016 1 commit
-
-
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:
-
- 21 Jun, 2016 1 commit
-
-
Vladyslav Batyrenko authored
Refactor ArchiveNode and ArchiveDirNode classes to Archive::Entry class and move its declaration to kerfuffle/archiveentry.h file. Make Archive::Entry store meta data in Q_PROPERTY members. Move EntryMetaDataType to part/archivemodel.cpp. Delete duplicated directory entries while reading from 7z archives. See: https://phabricator.kde.org/T2704
-
- 10 Jun, 2016 1 commit
-
-
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
-
- 05 Jun, 2016 1 commit
-
-
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
-
- 02 Jun, 2016 1 commit
-
-
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.
-
- 06 May, 2016 1 commit
-
-
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
-
- 03 May, 2016 1 commit
-
-
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
-