PSA: Please do not use KDEFrameworkCompilerSettings for non-KF projects

Friedrich W. H. Kossebau kossebau at kde.org
Tue Jan 19 15:57:09 GMT 2021


Hi,

the docs of the module tell us:
"KDEFrameworkCompilerSettings - Set stricter compile and link flags for KDE 
Frameworks modules."
https://api.kde.org/ecm/kde-module/KDEFrameworkCompilerSettings.html

And it has been meant that way. E.g. because extending those settings with 
more strict settings or new features would be done with other KF-specific 
requirements or policies in mind, always matching those of the current version 
(given KF & ECM are released in-sync).
Having to take care of backward-compatibility with non-KF usage and to do 
proper documentation adds additional burden not wanted here.

As convenient it is to not have to write out e.g. all the 
add_definitions(
    -DQT_NO_CAST_TO_ASCII
    -DQT_NO_CAST_FROM_ASCII
    -DQT_NO_URL_CAST_FROM_STRING
    -DQT_NO_CAST_FROM_BYTEARRAY
    -DQT_NO_SIGNALS_SLOTS_KEYWORDS
    -DQT_USE_QSTRINGBUILDER
    -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
)
that needs some other solution.

For ECM/KF5 times the train has left, we need to handle those existing abuses. 
But please fix your projects now already by changing back to 
KDECompilerSettings and the manual boilerplate, so in ECM/KF6 times that 
burden is gone.

Cheers
Friedrich





More information about the kde-devel mailing list