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

List:       kde-frameworks-devel
Subject:    Re: Review Request 125869: Allows protocoltojson & kio to handle translated json ExtraNames
From:       David Faure <faure () kde ! org>
Date:       2016-01-18 18:50:55
Message-ID: 20160118185055.18012.19514 () mimi ! kde ! org
[Download RAW message or body]

--===============4677097805031531503==
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/125869/#review91279
-----------------------------------------------------------


Fix it, then Ship it!





src/protocoltojson/main.cpp (line 137)
<https://git.reviewboard.kde.org/r/125869/#comment62406>

    looks unused to me



src/protocoltojson/main.cpp (line 138)
<https://git.reviewboard.kde.org/r/125869/#comment62407>

    const QString &key



src/protocoltojson/main.cpp (line 141)
<https://git.reviewboard.kde.org/r/125869/#comment62410>

    protocolData.insert(key, ...) would be slightly faster (see Effective C++)



src/protocoltojson/main.cpp (line 149)
<https://git.reviewboard.kde.org/r/125869/#comment62409>

    Move it outside the outer loop, so it gets constructed only once.



src/protocoltojson/main.cpp (line 159)
<https://git.reviewboard.kde.org/r/125869/#comment62408>

    const QString &


- David Faure


On Jan. 3, 2016, 6:19 p.m., Christoph Cullmann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125869/
> -----------------------------------------------------------
> 
> (Updated Jan. 3, 2016, 6:19 p.m.)
> 
> 
> Review request for KDE Frameworks, Albert Astals Cid, Alex Richardson, David Faure, \
> and Luigi Toscano. 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> Allows protocoltojson & kio to handle translated json ExtraNames
> 
> 
> Diffs
> -----
> 
> src/core/kprotocolinfo.cpp 7bfb9ad 
> src/protocoltojson/main.cpp 05b9364 
> 
> Diff: https://git.reviewboard.kde.org/r/125869/diff/
> 
> 
> Testing
> -------
> 
> make && make test still OK.
> 
> 
> File Attachments
> ----------------
> 
> trash.json
> https://git.reviewboard.kde.org/media/uploaded/files/2015/12/28/6ab2cd95-b0bd-4347-80f2-6f753fa50425__trash.json
>  
> 
> Thanks,
> 
> Christoph Cullmann
> 
> 


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



<p>

Fix it, then Ship it!

</p>









<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/125869/diff/2/?file=426285#file426285line138" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/protocoltojson/main.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

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



 
 

 <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">137</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="k">const</span> <span class="n">QStringList</span> <span \
class="n">allKeys</span> <span class="o">=</span> <span class="n">config</span><span \
class="p">.</span><span class="n">keyList</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;">looks \
unused to me</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/125869/diff/2/?file=426285#file426285line139" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/protocoltojson/main.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

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



 
 

 <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">138</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">Q_FOREACH</span><span class="p">(</span><span class="k">const</span> <span \
class="n">QString</span> <span class="n">key</span><span class="p">,</span> <span \
class="n">translatedStringListAttributes</span><span class="p">)</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;">const \
QString &amp;key</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/125869/diff/2/?file=426285#file426285line142" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/protocoltojson/main.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

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



 
 

 <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">141</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="n">protocolData</span><span class="p">[</span><span \
class="n">key</span><span class="p">]</span> <span class="o">=</span> <span \
class="n">config</span><span class="p">.</span><span class="n">readEntry</span><span \
class="p">(</span><span class="n">key</span><span class="p">,</span> <span \
class="n">QStringList</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;">protocolData.insert(key, ...) would be slightly faster (see Effective \
C++)</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/125869/diff/2/?file=426285#file426285line150" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/protocoltojson/main.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

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



 
 

 <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">149</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="n">QRegularExpression</span> <span class="n">re</span><span \
class="p">(</span><span class="s">&quot;^</span><span class="se">\\</span><span \
class="s">w+</span><span class="se">\\</span><span class="s">[(.*)</span><span \
class="se">\\</span><span class="s">]=&quot;</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;">Move \
it outside the outer loop, so it gets constructed only once.</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/125869/diff/2/?file=426285#file426285line160" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/protocoltojson/main.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

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



 
 

 <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">159</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="n">Q_FOREACH</span><span class="p">(</span><span class="k">const</span> \
<span class="n">QString</span> <span class="n">locale</span><span class="p">,</span> \
<span class="n">foundLocalesForKey</span><span class="p">)</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;">const \
QString &amp;</p></pre>  </div>
</div>
<br />



<p>- David Faure</p>


<br />
<p>On January 3rd, 2016, 6:19 p.m. UTC, Christoph Cullmann 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 Frameworks, Albert Astals Cid, Alex Richardson, David \
Faure, and Luigi Toscano.</div> <div>By Christoph Cullmann.</div>


<p style="color: grey;"><i>Updated Jan. 3, 2016, 6:19 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kio
</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;">Allows protocoltojson &amp; kio to handle translated \
json ExtraNames</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;">make &amp;&amp; make test still OK.</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>src/core/kprotocolinfo.cpp <span style="color: grey">(7bfb9ad)</span></li>

 <li>src/protocoltojson/main.cpp <span style="color: grey">(05b9364)</span></li>

</ul>

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



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>


 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/12/28/6ab2cd95-b0bd-4347-80f2-6f753fa50425__trash.json">trash.json</a></li>


</ul>




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







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


--===============4677097805031531503==--


[Attachment #3 (text/plain)]

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


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

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