[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-utils-devel
Subject:    Re: Review Request 124111: Support overwrite prompt of unrar v5
From:       "Raphael Kubo da Costa" <rakuco () FreeBSD ! org>
Date:       2015-07-12 21:50:46
Message-ID: 20150712215046.22904.28656 () mimi ! kde ! org
[Download RAW message or body]

--===============7775803415331669114==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit


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



kerfuffle/cliinterface.h (line 349)
<https://git.reviewboard.kde.org/r/124111/#comment56826>

    You should get rid of `m_storedFileName`. It's only referenced in one method, so \
it should be a local variable.



kerfuffle/cliinterface.cpp (line 643)
<https://git.reviewboard.kde.org/r/124111/#comment56827>

    Missing a period ('.') at the end of the comment.



kerfuffle/cliinterface.cpp (line 643)
<https://git.reviewboard.kde.org/r/124111/#comment56828>

    Missing a period ('.') at the end of the comment.



kerfuffle/cliinterface.cpp (line 645)
<https://git.reviewboard.kde.org/r/124111/#comment56829>

    This can be `const`.



kerfuffle/cliinterface.cpp (line 652)
<https://git.reviewboard.kde.org/r/124111/#comment56830>

    Don't you need to error out if no pattern matched?


- Raphael Kubo da Costa


On July 13, 2015, 12:43 a.m., Ragnar Thomsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124111/
> -----------------------------------------------------------
> 
> (Updated July 13, 2015, 12:43 a.m.)
> 
> 
> Review request for KDE Utils, Elvis Angelaccio and Raphael Kubo da Costa.
> 
> 
> Bugs: 349131
> http://bugs.kde.org/show_bug.cgi?id=349131
> 
> 
> Repository: ark
> 
> 
> Description
> -------
> 
> The overwrite prompt of unrar v5 changed compared to v3 and v4. This causes Ark to \
> hang when extracting a rar archive with unrar v5 when a destination file exists. In \
> unrar v5 the overwrite prompt looks like: 
> Would you like to replace the existing file file1.txt
> 32 bytes, modified on 15-05-2015 14:26
> with a new one
> 32 bytes, modified on 15-05-2015 14:26
> 
> and in unrar v3 and v4:
> 
> file1.txt already exists. Overwrite it ?
> 
> Ark currently only supports the v3/v4 prompt. This patch adds support for the v5 \
> prompt by defining a QStringList containing regexps for both prompts and iterating \
> through the QStringList in CliInterface::checkForFileExistsMessage(). 
> 
> Diffs
> -----
> 
> kerfuffle/cliinterface.h e93d443 
> kerfuffle/cliinterface.cpp 2718c11 
> plugins/cli7zplugin/cliplugin.cpp 1c1389f 
> plugins/clilhaplugin/cliplugin.cpp 3e2b338 
> plugins/clirarplugin/cliplugin.cpp 489abd6 
> plugins/clizipplugin/cliplugin.cpp c927581 
> 
> Diff: https://git.reviewboard.kde.org/r/124111/diff/
> 
> 
> Testing
> -------
> 
> Extracting rar archives using both v4 and v5 unrar works as expected, also when \
> destination exists. Extraction using clizip and cli7z also works as expected. 
> 
> Thanks,
> 
> Ragnar Thomsen
> 
> 


--===============7775803415331669114==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<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/124111/">https://git.reviewboard.kde.org/r/124111/</a>
  </td>
    </tr>
   </table>
   <br />











<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/124111/diff/5/?file=384955#file384955line350" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kerfuffle/cliinterface.h</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">private:</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">349</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QString</span> <span class="n">m_storedFileName</span><span \
class="p">;</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">You \
should get rid of <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: inherit;">m_storedFileName</code>. It's \
only referenced in one method, so it should be a local variable.</p></pre>  </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/124111/diff/5/?file=384956#file384956line644" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kerfuffle/cliinterface.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool \
CliInterface::checkForPasswordPromptMessage(const QString&amp; line)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">643</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="c1">// Check for a filename and store it</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">Missing a period ('.') at the end of the comment.</p></pre>  </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/124111/diff/5/?file=384956#file384956line644" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kerfuffle/cliinterface.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool \
CliInterface::checkForPasswordPromptMessage(const QString&amp; line)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">643</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="c1">// Check for a filename and store it</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">Missing a period ('.') at the end of the comment.</p></pre>  </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/124111/diff/5/?file=384956#file384956line646" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kerfuffle/cliinterface.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool \
CliInterface::checkForPasswordPromptMessage(const QString&amp; line)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">645</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">QRegExp</span> <span class="n">rxFileNamePattern</span><span \
class="p">(</span><span class="n">pattern</span><span class="p">);</span></pre></td>  \
</tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">This \
can be <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">const</code>.</p></pre>  </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/124111/diff/5/?file=384956#file384956line653" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kerfuffle/cliinterface.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 5)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool \
CliInterface::checkForPasswordPromptMessage(const QString&amp; line)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">652</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  \
</tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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;">Don't \
you need to error out if no pattern matched?</p></pre>  </div>
</div>
<br />



<p>- Raphael Kubo da Costa</p>


<br />
<p>On July 13th, 2015, 12:43 a.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 July 13, 2015, 12:43 a.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=349131">349131</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;">The overwrite prompt of unrar v5 changed compared to \
v3 and v4. This causes Ark to hang when extracting a rar archive with unrar v5 when a \
destination file exists. In unrar v5 the overwrite prompt looks like:</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;"><div class="codehilite" style="background: #f8f8f8"><pre \
style="line-height: 125%">Would you like to replace the existing file file1.txt  32 \
bytes, modified on 15-05-2015 14:26 with a new one
    32 bytes, modified on 15-05-2015 14:26
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">and in unrar v3 and v4:</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div \
class="codehilite" style="background: #f8f8f8"><pre style="line-height: \
125%">file1.txt already exists. Overwrite it ? </pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Ark currently only supports the v3/v4 prompt. This \
patch adds support for the v5 prompt by defining a QStringList containing regexps for \
both prompts and iterating through the QStringList in \
CliInterface::checkForFileExistsMessage().</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;">Extracting rar archives using both v4 and v5 unrar \
works as expected, also when destination exists. Extraction using clizip and cli7z \
also works as expected.</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>kerfuffle/cliinterface.h <span style="color: grey">(e93d443)</span></li>

 <li>kerfuffle/cliinterface.cpp <span style="color: grey">(2718c11)</span></li>

 <li>plugins/cli7zplugin/cliplugin.cpp <span style="color: \
grey">(1c1389f)</span></li>

 <li>plugins/clilhaplugin/cliplugin.cpp <span style="color: \
grey">(3e2b338)</span></li>

 <li>plugins/clirarplugin/cliplugin.cpp <span style="color: \
grey">(489abd6)</span></li>

 <li>plugins/clizipplugin/cliplugin.cpp <span style="color: \
grey">(c927581)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/124111/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============7775803415331669114==--


[Attachment #3 (text/plain)]

_______________________________________________
Kde-utils-devel mailing list
Kde-utils-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-utils-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic