Review Request 123967: Implement a cancelled() signal in ReadOnlyArchiveInterface to fix cancellation of password dialogs

Raphael Kubo da Costa rakuco at FreeBSD.org
Thu Jun 4 12:04:19 UTC 2015



> On June 4, 2015, 2:13 p.m., Raphael Kubo da Costa wrote:
> > part/part.cpp, line 635
> > <https://git.reviewboard.kde.org/r/123967/diff/5/?file=378572#file378572line635>
> >
> >     Are you sure this is going to work? If you have an error message (so `job->error() != 0`), you are reaching the `if` clause regardless of the error code (`KilledJobError` or `UserDefinedError`), and then the `else if` only works if `job->error()` returns 0 (no error).
> >     
> >     It might even be what's causing the inconsistency you described.
> 
> Ragnar Thomsen wrote:
>     I'm sorry but I don't follow your comment. If there is no error then the viewer is shown. If there is an error, we check if it is a KilledJobError. If not, show the errorbox, if it is a KilledJobError do nothing.

My bad, I got confused by ReviewBoard's UI and thouught that `else if` was a continuation of the `if` in line 510 :)


- Raphael


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


On June 1, 2015, 1:50 a.m., Ragnar Thomsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123967/
> -----------------------------------------------------------
> 
> (Updated June 1, 2015, 1:50 a.m.)
> 
> 
> Review request for KDE Utils, Elvis Angelaccio and Raphael Kubo da Costa.
> 
> 
> Bugs: 267670
>     http://bugs.kde.org/show_bug.cgi?id=267670
> 
> 
> Repository: ark
> 
> 
> Description
> -------
> 
> Implement a cancelled() signal in ReadOnlyArchiveInterface. This signal is emitted in CliInterface when the user cancels a password dialog. The signal is connected to a slot in Job which sets KJob::error to KJob::KilledJobError.
> 
> The callers (Part and BatchExtract) are modified to do nothing if the error code is KJob::KilledJobError when running ListJobs/ExtractJobs/AddJobs/DeleteJobs. This fixes an issue where the user cancels the "Enter password" dialog and the UI keeps being blocked and/or error messageboxes appear.
> 
> The commit ee006cb6a83e6cbd01a2dc459b8b0c8be664c05e in the frameworks branch should be reverted before applying this diff, since this is meant to be an improved replacement of that commit.
> 
> 
> Diffs
> -----
> 
>   app/batchextract.cpp 4adc519 
>   kerfuffle/archiveinterface.h 3126a4c 
>   kerfuffle/cliinterface.cpp 089f36c 
>   kerfuffle/jobs.h 0b85534 
>   kerfuffle/jobs.cpp f573498 
>   part/part.cpp 6fc9f55 
> 
> Diff: https://git.reviewboard.kde.org/r/123967/diff/
> 
> 
> Testing
> -------
> 
> Opened a password-protected zip archive, clicked on a file and cancelled the dialog. Opened a password-protected zip archive, selected a file for extraction and cancelled the password dialog. Opened a password-protected rar archive, and cancelled the password dialog. In all cases, the UI is not blocked after cancelling the dialog and no message boxes appear.
> 
> 
> Thanks,
> 
> Ragnar Thomsen
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20150604/8ac53b5f/attachment.html>


More information about the Kde-utils-devel mailing list