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

List:       kde-frameworks-devel
Subject:    Re: Review Request 115028: Inline deprecated KUser::fullName() method
From:       "David Faure" <faure () kde ! org>
Date:       2014-02-22 9:03:08
Message-ID: 20140222090308.7229.38868 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Feb. 20, 2014, 12:16 p.m., Kevin Ottens wrote:
> > src/lib/CMakeLists.txt, line 86
> > <https://git.reviewboard.kde.org/r/115028/diff/2/?file=242294#file242294line86>
> > 
> > Not sure about that... I don't think we want the library itself to use deprecated methods. \
> > So knowing about that through warnings would make sense.
> 
> Alex Merry wrote:
> This actually ends up making no difference for KCoreAddons.  Other frameworks have annoying \
> false positives where there are deprecated slots, as these are used from the moc-generated \
> code.  And also tests for deprecated methods. 
> Note that this would not silence warnings about using deprecated code from other libraries.

If it makes no difference for kcoreaddons, let's leave deprecation warnings enabled (in case we \
deprecate something else later). But indeed in the frameworks where it's not fixable \
(deprecated slots), we could add such a line, with a comment about why. False positives are \
annoying and can make people ignore real issues.

Unittest for deprecated code... maybe we can add the definition (to disable warnings) *just* \
for these tests, after splitting them out...


- David


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


On Feb. 6, 2014, 5:20 p.m., Alex Merry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115028/
> -----------------------------------------------------------
> 
> (Updated Feb. 6, 2014, 5:20 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> -------
> 
> Inline deprecated KUser::fullName() method
> 
> 
> Use KCOREADDONS_NO_DEPRECATED instead of KDE_NO_DEPRECATED
> 
> KCOREADDONS_NO_DEPRECATED is the macro controlled by
> generate_export_header; KDE_NO_DEPRECATED is left over from kdelibs.
> 
> Disable deprecation macro when building the library itself
> 
> This prevents spurious compiler warnings (particularly when slots are
> deprecated).
> 
> 
> Diffs
> -----
> 
> src/lib/util/kuser.h 2b6e6ed92bc1465945f36f2fde821f36fa51585f 
> src/lib/util/kuser_unix.cpp 8a3a39d379ca863b4906bb01228c5e01a5b955b0 
> src/lib/util/kuser_win.cpp 6a6cbb1751bd569d8684f8e11add1ef304c0a94d 
> src/lib/CMakeLists.txt e48904dabe7b2790599c34673832b6ce38eab0e3 
> 
> Diff: https://git.reviewboard.kde.org/r/115028/diff/
> 
> 
> Testing
> -------
> 
> configures, compiles, tests pass (well, except KDirWatch-FAM, which has never passed for me).
> 
> 
> Thanks,
> 
> Alex Merry
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/115028/">https://git.reviewboard.kde.org/r/115028/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 20th, 2014, 12:16 p.m. UTC, <b>Kevin Ottens</b> \
wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  



<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/115028/diff/2/?file=242294#file242294line86" \
style="color: black; font-weight: bold; text-decoration: underline;">src/lib/CMakeLists.txt</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">86</font></th>  \
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"><span class="nb">target_compile_definitions</span><span class="p">(</span><span \
class="s">KF5CoreAddons</span> <span class="s">PRIVATE</span> <span \
class="s">KCOREADDONS_DEPRECATED=</span><span class="p">)</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; \
white-space: -o-pre-wrap; word-wrap: break-word;">Not sure about that... I don&#39;t think we \
want the library itself to use deprecated methods. So knowing about that through warnings would \
make sense.</pre>  </blockquote>



 <p>On February 20th, 2014, 12:54 p.m. UTC, <b>Alex Merry</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; \
white-space: -o-pre-wrap; word-wrap: break-word;">This actually ends up making no difference \
for KCoreAddons.  Other frameworks have annoying false positives where there are deprecated \
slots, as these are used from the moc-generated code.  And also tests for deprecated methods.

Note that this would not silence warnings about using deprecated code from other \
libraries.</pre>  </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">If it makes no difference for \
kcoreaddons, let&#39;s leave deprecation warnings enabled (in case we deprecate something else \
later). But indeed in the frameworks where it&#39;s not fixable (deprecated slots), we could \
add such a line, with a comment about why. False positives are annoying and can make people \
ignore real issues.

Unittest for deprecated code... maybe we can add the definition (to disable warnings) *just* \
for these tests, after splitting them out...</pre> <br />




<p>- David</p>


<br />
<p>On February 6th, 2014, 5:20 p.m. UTC, Alex Merry wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black solid;">  <tr>
  <td>

<div>Review request for KDE Frameworks.</div>
<div>By Alex Merry.</div>


<p style="color: grey;"><i>Updated Feb. 6, 2014, 5:20 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kcoreaddons
</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;">Inline deprecated \
KUser::fullName() method


Use KCOREADDONS_NO_DEPRECATED instead of KDE_NO_DEPRECATED

KCOREADDONS_NO_DEPRECATED is the macro controlled by
generate_export_header; KDE_NO_DEPRECATED is left over from kdelibs.

Disable deprecation macro when building the library itself

This prevents spurious compiler warnings (particularly when slots are
deprecated).</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;">configures, compiles, \
tests pass (well, except KDirWatch-FAM, which has never passed for me).</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/lib/util/kuser.h <span style="color: \
grey">(2b6e6ed92bc1465945f36f2fde821f36fa51585f)</span></li>

 <li>src/lib/util/kuser_unix.cpp <span style="color: \
grey">(8a3a39d379ca863b4906bb01228c5e01a5b955b0)</span></li>

 <li>src/lib/util/kuser_win.cpp <span style="color: \
grey">(6a6cbb1751bd569d8684f8e11add1ef304c0a94d)</span></li>

 <li>src/lib/CMakeLists.txt <span style="color: \
grey">(e48904dabe7b2790599c34673832b6ce38eab0e3)</span></li>

</ul>

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







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








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



_______________________________________________
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