Review Request 125399: Enable loading alternative plugins and add executable check
Elvis Angelaccio
elvis.angelaccio at kdemail.net
Sat Sep 26 14:39:22 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125399/#review85971
-----------------------------------------------------------
kerfuffle/archiveinterface.h (line 121)
<https://git.reviewboard.kde.org/r/125399/#comment59330>
This boolean member is unnecessary, since it's only used to distinguish a `CliInterface`. The default `isCliBased()` method could just return false, and `CliInterface::isCliBased()` would then override it and return true.
kerfuffle/archiveinterface.cpp (line 69)
<https://git.reviewboard.kde.org/r/125399/#comment59324>
The semicolon is unnecessary with Q_UNUSED macros.
kerfuffle/cliinterface.cpp (line 89)
<https://git.reviewboard.kde.org/r/125399/#comment59334>
This function can be slightly optimized/simplified. You are checking at the end whether all the programs are found. Instead, if something is not found, there is no point in searching the remaining executables; you can just return false and you're done.
plugins/cli7zplugin/kerfuffle_cli7z.desktop.cmake (line 11)
<https://git.reviewboard.kde.org/r/125399/#comment59327>
I think it would be better to increase this priority in the "final" patch (i.e. the one where you will close all the related unicode bugs). This way, if something goes wrong, it will be easier to revert that patch without affecting the code in this one.
- Elvis Angelaccio
On Sept. 25, 2015, 7:26 p.m., Ragnar Thomsen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125399/
> -----------------------------------------------------------
>
> (Updated Sept. 25, 2015, 7:26 p.m.)
>
>
> Review request for KDE Utils, Elvis Angelaccio and Raphael Kubo da Costa.
>
>
> Repository: ark
>
>
> Description
> -------
>
> Plugin loading code is reworked so Ark attempts other plugins, if first priority plugin fails. For CliPlugins, Ark now also searches for executables (as specified in ParameterList in the individual plugins) in standard path after the plugin has been loaded and if they are not found moves on to next plugin in list. It requires all four type of executables to be found (ListProgram, ExtractProgram, AddProgram and DeleteProgram). However, if the plugin is readonly (as specified by the X-KDE-Kerfuffle-ReadWrite property in the desktop file), it only requires ListProgram and ExtractProgram.
>
> This paves the way for setting cli7z priority higher than clizip to improve unicode support. If p7zip is not installed by distributions, Ark will now automatically fallback to using the more widely-installed clizip.
>
>
> Diffs
> -----
>
> kerfuffle/archive_kerfuffle.cpp f17155c
> kerfuffle/archiveinterface.h 1aac2a4
> kerfuffle/archiveinterface.cpp d8a6725
> kerfuffle/cliinterface.h e4bc6f3
> kerfuffle/cliinterface.cpp b537f95
> plugins/cli7zplugin/kerfuffle_cli7z.desktop.cmake 3914ec5
>
> Diff: https://git.reviewboard.kde.org/r/125399/diff/
>
>
> Testing
> -------
>
> 1. Tried moving one of the infozip executables out of path -> Ark doesn't error out, but uses cli7z plugin instead.
> 2. Tried changing X-KDE-Kerfuffle-ReadWrite to false for some plugin -> Ark only searches for ListProgram and ExtractProgram.
>
>
> Thanks,
>
> Ragnar Thomsen
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20150926/ad499080/attachment.html>
More information about the Kde-utils-devel
mailing list