<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/123967/">https://git.reviewboard.kde.org/r/123967/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Before commenting on the smaller details in the code, a few more pressing comments:</p>
<ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">You are checking for <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">ReadOnlyArchiveInterface::Cancelled</code> in several parts which only interact with the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Job</code> layer, which looks like an oversight.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">In certain cases in <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">cliinterface.cpp</code> (specifically, <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">handleLine()</code>), manually emitting <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">finished()</code> in addition to calling <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">failOperation()</code> causes crashes. See commit c7af2d6372ea2b222e1af223b3fd53cdeb1f3c2b.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Have you seen the follow-up I sent to my own email in kde-commits? http://article.gmane.org/gmane.comp.kde.cvs/1420983 -- it contains a suggestion for a different approach that might avoid some of the pitfalls here.</li>
</ul></pre>
<br />
<p>- Raphael Kubo da Costa</p>
<br />
<p>On May 31st, 2015, 7:51 p.m. EEST, Ragnar Thomsen wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Utils, Elvis Angelaccio and Raphael Kubo da Costa.</div>
<div>By Ragnar Thomsen.</div>
<p style="color: grey;"><i>Updated May 31, 2015, 7:51 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=267670">267670</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
ark
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Change the argument of the ReadOnlyArchiveInterface::finished() from bool to a new enum with the possible values: Success, Cancelled and ProgramNotFound. Similarly change the argument of the Job::onFinished() slot. This way CliInterface can send a finished() signal with the Cancelled argument. Job handles the finished signal in the OnFinished() slot and sets the KJob::error() to KJob::KilledJobError if argument is "Cancelled". The callers (Part and BatchExtract) are modified to do nothing if the error code is KJob::KilledJobError. This fixes an issue where the user cancels the "Enter password" dialog and the UI keeps being blocked and/or error messageboxes appear.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>app/batchextract.cpp <span style="color: grey">(4adc519)</span></li>
<li>kerfuffle/archiveinterface.h <span style="color: grey">(3126a4c)</span></li>
<li>kerfuffle/cliinterface.cpp <span style="color: grey">(089f36c)</span></li>
<li>kerfuffle/jobs.h <span style="color: grey">(5e177d3)</span></li>
<li>kerfuffle/jobs.cpp <span style="color: grey">(061b75e)</span></li>
<li>part/part.cpp <span style="color: grey">(fa1688e)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/123967/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>