D22768: Forward declare KLocalizedString and make I18n a private dependency.
Daan De Meyer
noreply at phabricator.kde.org
Fri Jul 26 23:47:40 BST 2019
daandemeyer created this revision.
daandemeyer added a reviewer: Frameworks.
daandemeyer added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
daandemeyer requested review of this revision.
REVISION SUMMARY
When refactoring Kate's CMake scripts, I was looking into why a target got an interface dependency on I18n when linking against KTextEditor and I tracked it down to KTextWidgets. Since there's only one small usage in a single widget that can be forward-declared it seems excessive to add I18n as an interface dependency. This revision forward-declares the usage of KLocalizedString and makes I18n a private dependency. This avoids I18n leaking into dependent libraries.
This will break code implicitly depending on KTextWidget's I18n dependency, as well as code that implicitly depens on KPluralHandlingSpinBox KlocalizedString include. The fix is to explicitly link against I18n and explicitly include KLocalizedString respectively. I'm not sure how breaking changes are handled in KDE Frameworks. If breaking changes are not an option this revision can be closed.
REPOSITORY
R310 KTextWidgets
REVISION DETAIL
https://phabricator.kde.org/D22768
AFFECTED FILES
autotests/CMakeLists.txt
autotests/kpluralhandlingspinboxtest.cpp
src/CMakeLists.txt
src/widgets/kpluralhandlingspinbox.cpp
src/widgets/kpluralhandlingspinbox.h
To: daandemeyer, #frameworks
Cc: kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190726/c2e6ce5f/attachment.html>
More information about the Kde-frameworks-devel
mailing list