D24965: KConfigWidgets: port away from KF5 deprecated API
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Sat Oct 26 17:34:27 BST 2019
kossebau added a comment.
So seems I missed to make clear what I meant, next try :)
The goal is: make clients (e.g. apps) which are still using this method to set the app icon aware by a compiler warning that they should port their code to use QApplication::setWindowIcon. For that we would keep KCOREADDONS_DEPRECATED_VERSION, as it is what sets the warning attribute, if asked by given settings.
What we cannot do is to allow making the API invisible to the compiler in general, as infrastructure code support such legacy settings always needs to access it. So we remove the wrapping with #if/#endif and KCOREADDONS_ENABLE_DEPRECATED_SINCE, as that is the one which controls the visibility of the API.
And for the very infrastructure code we also need to have a way to not get the deprecation warning, as for that using the API is fine still. So we need to tell the compiler somehow the deprecation warning in such usage needs to be ignored. One could do complicated logic to have the KCOREADDONS_DEPRECATED_VERSION care for another macro definition. But for now the most simply might be to just tell the compiler in the calling code to ignore for that line deprecation warnings.
REPOSITORY
R265 KConfigWidgets
REVISION DETAIL
https://phabricator.kde.org/D24965
To: dfaure, kossebau, elvisangelaccio, vkrause
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191026/5c3bd3d9/attachment.html>
More information about the Kde-frameworks-devel
mailing list