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

List:       kde-frameworks-devel
Subject:    Re: Review Request 126620: Fixed most of level 1 and level 2 warnings
From:       "David Faure" <faure () kde ! org>
Date:       2016-01-04 8:00:31
Message-ID: 20160104080031.6499.3002 () mimi ! kde ! org
[Download RAW message or body]

--===============6144104841612157317==
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/126620/#review90525
-----------------------------------------------------------

Ship it!


Yes, C++11 style connect is fine in KF5.

However QTimer::singleShot has to keep using the SLOT() syntax for now, to Qt 5.3 \
compat (until Qt 5.6 is out, then we'll drop Qt 5.3).


src/browserextension.cpp (line 257)
<https://git.reviewboard.kde.org/r/126620/#comment61882>

    This won't compile with Qt 5.3, please revert this particular line.


- David Faure


On Jan. 3, 2016, 9:09 p.m., Artur Puzio wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126620/
> -----------------------------------------------------------
> 
> (Updated Jan. 3, 2016, 9:09 p.m.)
> 
> 
> Review request for KDE Frameworks and Aleix Pol Gonzalez.
> 
> 
> Repository: kparts
> 
> 
> Description
> -------
> 
> Fixed `warning: QString* being called [-Wclazy-qstring-uneeded-heap-allocations]` \
> by changing to `QStringLiteral`-s. In `plugin.cpp:96` I haven't fixed the warnings, \
> becouse `QStringLiteral` would give an error. I applied my own optimisation \
> instead. Fixed `warning: Don't call QList::first() on temporary \
> [-Wclazy-detaching-temporary]` by changeing to `at(0)` Fixed `warning: Reserve \
> candidate [-Wclazy-reserve-candidates]` by adding a simple `reserve` Fixed \
> `warning: Old Style Connect [-Wclazy-old-style-connect]` I had to change all of \
> them by hand, becouse of a bug in clazy that I will be reporting. I wasn't able to \
> change 4 Old Style Connects. (3 in `kreadonlypart.cpp`, 1 in `readwritepart.cpp`) \
> Fixed `warning: KParts::BrowserOpenOrSaveQuestion has dtor but not copy-ctor, \
> copy-assignment [-Wclazy-rule-of-three]`, by adding `Q_DISABLE_COPY`, becouse \
> `BrowserOpenOrSaveQuestionPrivate` isn't copyable Only warnings that I left are the \
> `[-Wclazy-function-args-by-ref]` warnings, becouse they would involve modifying \
> headers. 
> 
> Diffs
> -----
> 
> src/browserextension.cpp 4b7252c 
> src/browseropenorsavequestion.h 85dcfa0 
> src/browseropenorsavequestion.cpp c1425c1 
> src/browserrun.cpp 4756511 
> src/browserrun_p.h 4742598 
> src/mainwindow.cpp 9b0c3c5 
> src/part.cpp 1657561 
> src/partmanager.cpp 81bf73f 
> src/plugin.cpp 97f7d28 
> src/scriptableextension.cpp 27676bc 
> 
> Diff: https://git.reviewboard.kde.org/r/126620/diff/
> 
> 
> Testing
> -------
> 
> Automated tests pass.
> Imported note: On my computer I'm runing versions 5.17.0 and it wasn't possible for \
> me to upgrade easly, so I changed the CMakeFiles.txt to compile it. (of course the \
> changed isn't included in this RR) 
> 
> Thanks,
> 
> Artur Puzio
> 
> 


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



 <p>Ship it!</p>



 <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;">Yes, \
C++11 style connect is fine in KF5.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">However \
QTimer::singleShot has to keep using the SLOT() syntax for now, to Qt 5.3 compat \
(until Qt 5.6 is out, then we'll drop Qt 5.3).</p></pre>  <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/126620/diff/1/?file=428323#file428323line257" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/browserextension.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </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; ">void \
BrowserExtension::slotOpenUrlRequest(const QUrl &amp;url, const \
KParts::OpenUrlArguments &amp;args, const KParts::BrowserArguments \
&amp;browserArgs)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">257</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QTimer</span><span class="o">::</span><span \
class="n">singleShot</span><span class="p">(</span><span class="mi">0</span><span \
class="p">,</span> <span class="k">this</span><span class="p">,</span> <span \
class="n"><span class="hl">SLOT</span></span><span class="p"><span \
class="hl">(</span></span><span class="n">slotEmitOpenUrlRequestDelayed</span><span \
class="p"><span class="hl">())</span>);</span></pre></td>  <th bgcolor="#e9eaa8" \
style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">257</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">QTimer</span><span class="o">::</span><span \
class="n">singleShot</span><span class="p">(</span><span class="mi">0</span><span \
class="p">,</span> <span class="k">this</span><span class="p">,</span> <span \
class="o"><span class="hl">&amp;</span></span><span class="n"><span \
class="hl">BrowserExtension</span></span><span class="o"><span \
class="hl">::</span></span><span class="n">slotEmitOpenUrlRequestDelayed</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 \
won't compile with Qt 5.3, please revert this particular line.</p></pre>  </div>
</div>
<br />



<p>- David Faure</p>


<br />
<p>On January 3rd, 2016, 9:09 p.m. UTC, Artur Puzio 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 and Aleix Pol Gonzalez.</div>
<div>By Artur Puzio.</div>


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









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kparts
</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;">Fixed <code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">warning: \
QString* being called [-Wclazy-qstring-uneeded-heap-allocations]</code> by changing \
to <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">QStringLiteral</code>-s. In <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">plugin.cpp:96</code> I haven't fixed the warnings, becouse \
<code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">QStringLiteral</code> would give an error. I \
applied my own optimisation instead. Fixed <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">warning: Don't call QList::first() on temporary \
[-Wclazy-detaching-temporary]</code> by changeing to <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">at(0)</code> Fixed <code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">warning: \
Reserve candidate [-Wclazy-reserve-candidates]</code> by adding a simple <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">reserve</code> Fixed <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">warning: Old Style Connect [-Wclazy-old-style-connect]</code> I had to \
change all of them by hand, becouse of a bug in clazy that I will be reporting. I \
wasn't able to change 4 Old Style Connects. (3 in <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">kreadonlypart.cpp</code>, 1 in <code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">readwritepart.cpp</code>) Fixed <code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">warning: \
KParts::BrowserOpenOrSaveQuestion has dtor but not copy-ctor, copy-assignment \
[-Wclazy-rule-of-three]</code>, by adding <code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">Q_DISABLE_COPY</code>, becouse <code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">BrowserOpenOrSaveQuestionPrivate</code> isn't copyable Only warnings that I \
left are the <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: \
inherit;">[-Wclazy-function-args-by-ref]</code> warnings, becouse they would involve \
modifying headers.</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;">Automated tests pass. Imported note: On my computer \
I'm runing versions 5.17.0 and it wasn't possible for me to upgrade easly, so I \
changed the CMakeFiles.txt to compile it. (of course the changed isn't included in \
this RR)</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/browserextension.cpp <span style="color: grey">(4b7252c)</span></li>

 <li>src/browseropenorsavequestion.h <span style="color: grey">(85dcfa0)</span></li>

 <li>src/browseropenorsavequestion.cpp <span style="color: \
grey">(c1425c1)</span></li>

 <li>src/browserrun.cpp <span style="color: grey">(4756511)</span></li>

 <li>src/browserrun_p.h <span style="color: grey">(4742598)</span></li>

 <li>src/mainwindow.cpp <span style="color: grey">(9b0c3c5)</span></li>

 <li>src/part.cpp <span style="color: grey">(1657561)</span></li>

 <li>src/partmanager.cpp <span style="color: grey">(81bf73f)</span></li>

 <li>src/plugin.cpp <span style="color: grey">(97f7d28)</span></li>

 <li>src/scriptableextension.cpp <span style="color: grey">(27676bc)</span></li>

</ul>

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






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







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


--===============6144104841612157317==--


[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