<table><tr><td style="">kossebau added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D27989">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D27989#670659" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: line-through;">D27989#670659</a>, <a href="https://phabricator.kde.org/p/vkrause/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@vkrause</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>There's two remaining users in everything covered by lxr, the Plasma clipboard (patch in review: <a href="https://phabricator.kde.org/D29478" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/D29478</a>) and KDE PIM (which now depends on a sufficiently new KF5 version to actually do the migration). Both ways can be argued of course, I optimized for "helps me" (the warnings for things I can't change yet don't), and "migration is my problem" rather than "migration is somebody else's problem" (which is my understanding of how we are supposed to be doing KF deprecations to ease the 6 transition).</p></div>
</blockquote>
<p>For projects who cannot/do not want yet to adapt to deprecated API (e.g. because they do not fancy #if version #else #endif), they can make use of the built-in features with the deprecation system to deactivate warnings for any API which was set as deprecated initially only after a certain version:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">QT_DEPRECATED_WARNINGS_SINCE (as in, show warnings for API deprecated at least since or already in older versions)</li>
<li class="remarkup-list-item">KF_DEPRECATED_WARNINGS_SINCE (same as above, KF_ being the group default, with KFOO_ allowing to fine-tune per module)</li>
</ul>
<p>Both are by default set to the number of the current version (so all warnings are shown), but if using QT_DISABLE_DEPRECATED_BEFORE or KF_DISABLE_DEPRECATED_BEFORE_AND_AT (& KFOO_DISABLE_DEPRECATED_BEFORE_AND_AT) those are defaulting instead to the version given in those macro, so automatically disabling any warnings for API deprecated in newer versions. One has to actively overwrite that to see warnings again (like e..g done for KF modules gloibally in <a href="https://phabricator.kde.org/source/extra-cmake-modules/browse/master/kde-modules/KDEFrameworkCompilerSettings.cmake$68" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/source/extra-cmake-modules/browse/master/kde-modules/KDEFrameworkCompilerSettings.cmake$68</a></p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"> add_definitions(
-DQT_DEPRECATED_WARNINGS_SINCE=0x060000
-DKF_DEPRECATED_WARNINGS_SINCE=0x060000
)</pre></div>
<p>So the idea here is to allow to disable warnings for API deprecations one does not want to care about (yet). So unwanted noise should be design not be a reason here to delay adding the compiler warning macro and the compiler visibility wrapper. Note: Qt is lacking a bit here and there, some deprecations are not properly tagged to support that. KF instead shines there :)</p>
<p>For being silent about the warnings while still doing patches all yourself: while of course it is nice/recommended to help all KDE projects to adapt to some new API by the persons who introduced it, it also is good to get some real world feedback by having people with other mindsets who try to make use of the new API, and who thus might discover issues with the new API or its documentation. And some people are just fine to help out for their own projects to jump to latest best API as well, so they would be happy to learn about as early as possible by having the compiler points things out.</p>
<p>See e.g. how KRun is deprecated currently. Are people upset about the approach? I do not think so. Because they see David going around and helping with the ports. And they see how the new async API is better.</p>
<p>So, no harm here in having the compiler from day one inform interested developers about the deprecation. IMHO, but also covered by what is done elsewhere :) Actually, it is part of the design with the control about compiler warnings by version.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R280 Prison</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27989">https://phabricator.kde.org/D27989</a></div></div><br /><div><strong>To: </strong>vkrause, svuorela<br /><strong>Cc: </strong>kossebau, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns<br /></div>