How do you label code to be deleted in KF6?

David Hurka david.hurka at mailbox.org
Tue Nov 9 08:10:30 GMT 2021


On Tuesday, November 9, 2021 3:33:44 AM CET you wrote:
> I would like to have some members of KCalendarCore's incidence classes
> removed during the transition from KF5 to KF6, and I'd like to be sure
> that the changes won't be missed in the excitement.
> 
> Do you have some preferred way to label such changes?  For example, is
> there some `#if` statement that can be wrapped around the code, such
> that it will be compiled into KF5 but compiled out of KF6?

I have seen:

#include <kcalendercore_version.h>
#if KCALENDERCORE_VERSION < QT_VERSION_CHECK(6, 0, 0)
blabla
#endif

I think kcalendercore_version.h and similar are created by ecm_setup_version() 
and similar functions in CMakeLists.txt files.

I have seen comments like the following:

// TODO Remove when no longer needed

where TODO may be replaced by ###, FIXME, QT6, KF6, KF5.99, ABI, BIC, etc.

I think the QT_VERSION_CHECK method is useful here, because it provides the 
functionality you need.
Because it has functionality, it is the only consistent method which can be 
searched with `git grep QT_VERSION_CHECK`.

Cheers, David





More information about the kde-devel mailing list