Forcing Q_SLOTS on non frameworks code
Alex Merry
kde at randomguy3.me.uk
Sat Dec 14 15:12:57 UTC 2013
On 14/12/13 15:04, Albert Astals Cid wrote:
> Easy peasy.
>
> extra-cmake-modules/kde-modules/KDECompilerSettings.cmake does
>
> add_definitions(-DQT_NO_CAST_TO_ASCII
> -DQT_NO_CAST_FROM_ASCII
> -DQT_STRICT_ITERATORS
> -DQT_NO_URL_CAST_FROM_STRING
> -DQT_NO_CAST_FROM_BYTEARRAY
> -DQT_NO_SIGNALS_SLOTS_KEYWORDS
> -DQT_USE_FAST_CONCATENATION
> -DQT_USE_FAST_OPERATOR_PLUS
> )
>
> I guess that'd need to be refined into something that is enabled on demand
> (i.e. for frameworks).
>
> I am by far a cmake expert but if you guys tell me what needs to be done I can
> try to make it happen.
The idea of having two sets of settings, one for frameworks and one for
normal applications, has come up on this list before, although I think
nothing ever came of it in the end.
The most obvious options are to either have a
KDEFrameworkCompilerSettings module, or a cmake function called
something like kf5_apply_framework_settings that would apply the
relevant definitions.
Alex
More information about the Kde-frameworks-devel
mailing list