kossebau added inline comments.

INLINE COMMENTS

> kservice.cpp:982
>  
> +#if KSERVICE_ENABLE_DEPRECATED_SINCE(5, 65)
>  bool KService::allowAsDefault() const

This should be BUILD, not ENABLE.

*BUILD* macros are controlled by the EXCLUDE_DEPRECATED_BEFORE_AND_AT value, 
which iis what is used at build time of the library itself, and then hardcoded 
with the installed headers.
*ENABLE* macros are controlled by KF_DISABLE_DEPRECATED_BEFORE_AND_AT value, 
which is used when building against the library, and can be controlled by the 
user of the library.
To avoid duplication, the *ENABLE* macros are also reused in the headers during 
the build time of the library itself, to not to have to write

  #if KSERVICE_ENABLE_DEPRECATED_SINCE(5, 65) AND 
KSERVICE_BUILD_DEPRECATED_SINCE(5, 65) 

While it works to use *ENABLE* also in the sources, like the reuse works in the 
headers, it is bad practice as it blurs the purposes of the ENABLE vs the BUILD 
macros, where the latter is only to be set at build time of the library itself. 
So to not give people wrong ideas, the BUILD macros should be used everywhere 
where only in the build of the library itself it is deciced via the 
EXCLUDE_DEPRECATED_BEFORE_AND_AT value whether code should be part of the 
created library.

> kserviceoffer.cpp:97
>  
> +#if KSERVICE_ENABLE_DEPRECATED_SINCE(5, 65)
>  bool KServiceOffer::allowAsDefault() const

KSERVICE_BUILD_DEPRECATED_SINCE

REPOSITORY
  R309 KService

REVISION DETAIL
  https://phabricator.kde.org/D25798

To: nicolasfella, #frameworks
Cc: kossebau, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

Reply via email to