Review Request 124018: Implement multiple DND selection

Elvis Angelaccio elvis.angelaccio at kdemail.net
Sun Jun 14 10:06:41 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124018/#review81461
-----------------------------------------------------------


The patch looks good. I have only few comments from my side. Wait Raphael for the final word.


kerfuffle/archive_kerfuffle.h (line 92)
<https://git.reviewboard.kde.org/r/124018/#comment55819>

    Why not making it a class? Having a struct in one of the most important signature (i.e. `copyFiles`) doesn't look too good to me.
    Plus, why not leaving `QVariant` for the type of `file` and `rootNode`? You could add getters to retrieve their `QString` conversion when needed.



kerfuffle/archive_kerfuffle.h (line 156)
<https://git.reviewboard.kde.org/r/124018/#comment55820>

    This function is not used anymore, why not removing it?



part/part.cpp (line 66)
<https://git.reviewboard.kde.org/r/124018/#comment55821>

    Unnecessary `include`.


- Elvis Angelaccio


On June 5, 2015, 4:23 p.m., Ragnar Thomsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124018/
> -----------------------------------------------------------
> 
> (Updated June 5, 2015, 4:23 p.m.)
> 
> 
> Review request for KDE Utils, Elvis Angelaccio and Raphael Kubo da Costa.
> 
> 
> Bugs: 187152
>     http://bugs.kde.org/show_bug.cgi?id=187152
> 
> 
> Repository: ark
> 
> 
> Description
> -------
> 
> This patch implements multiple drag'n'drop selection. 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 branch. However, in the multiple-dnd-selection branch, each cluster of files with a common parent node had to be run in an individual ExtractJob. This patch does the following:
> 
> 1. Create a struct fileRootNodePair, which contains two QStrings: The filename including relative path and a RootNode.
> 2. Change the first argument of ExtractJob::ExtractJob, which specifies which files are to be extracted, from a QVariantList to QList<fileRootNodePair>.
> 3. ReadOnlyArchiveInterface::copyFiles and the corresponding methods in inheriting classes (CliInterface, LibArchiveInterface, LibSingleFileInterface) are changed to take QList<fileRootNodePair> instead of QVariantList as argument.
> 
> This allows us to pass an individual RootNode for each file, enabling the extraction to be done in a single ExtractJob, which is more appropriate since the UI can then display the total number of entries being extracted and a single progress bar.
> 
> The CLI plugins, e.g. zip and rar, still extract with full path, due to not supporting RootNodes. However, this is a separate issue and will be fixed in another commit.
> 
> 
> Diffs
> -----
> 
>   app/batchextract.cpp 3ea90bd 
>   kerfuffle/archive_kerfuffle.h 886da3e 
>   kerfuffle/archive_kerfuffle.cpp d5b290b 
>   kerfuffle/archiveinterface.h 968237d 
>   kerfuffle/cliinterface.h e93d443 
>   kerfuffle/cliinterface.cpp 2ce6a06 
>   kerfuffle/jobs.h 2911cf5 
>   kerfuffle/jobs.cpp ff365c3 
>   part/archivemodel.h 13e062d 
>   part/archivemodel.cpp 7999e4b 
>   part/archiveview.cpp 2acefbd 
>   part/part.h dadde04 
>   part/part.cpp 084ef9f 
>   plugins/libarchive/libarchivehandler.h 088c0fe 
>   plugins/libarchive/libarchivehandler.cpp 598cbec 
>   plugins/libsinglefileplugin/singlefileplugin.h 6140bfe 
>   plugins/libsinglefileplugin/singlefileplugin.cpp 941022d 
> 
> Diff: https://git.reviewboard.kde.org/r/124018/diff/
> 
> 
> Testing
> -------
> 
> 1. Selecting and dragging a subfolder from an archive results in the folder being extracted without path to destination and all its subfolders/files being extracted with relative path (i.e. path below selected subfolder).
> 2. Selecting and dragging one or more files results in the file being extracted without path.
> 3. A single job tracker is displayed with the total number of files+folders and the progress bar works as expected.
> 4. Selecting and dragging files/folders from zip/rar archives results in the selected entries being extracted with full path.
> 5. Batching-extracting using ark -b <archive> works as expected.
> 
> 
> Thanks,
> 
> Ragnar Thomsen
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20150614/60bb1332/attachment-0001.html>


More information about the Kde-utils-devel mailing list