diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ list(APPEND CMAKE_AUTOMOC_MACRO_NAMES ${KCMUtils_AUTOMOC_MACRO_NAMES}) endif() -include(GenerateExportHeader) +include(ECMGenerateExportHeader) include(ECMSetupVersion) include(ECMGenerateHeaders) include(CMakePackageConfigHelpers) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,8 +15,14 @@ ) add_library(KF5KCMUtils ${kcmutils_LIB_SRCS}) -generate_export_header(KF5KCMUtils BASE_NAME KCMUtils) - +ecm_generate_export_header(KF5KCMUtils + BASE_NAME KCMUtils + GROUP_BASE_NAME KF + VERSION ${KF5_VERSION} + DEPRECATED_BASE_VERSION 0 + DEPRECATION_VERSIONS 5.66 + EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} +) target_include_directories(KF5KCMUtils INTERFACE "$") target_link_libraries(KF5KCMUtils diff --git a/src/kcmodulecontainer.h b/src/kcmodulecontainer.h --- a/src/kcmodulecontainer.h +++ b/src/kcmodulecontainer.h @@ -30,6 +30,7 @@ class KCModuleProxy; +#if KCMUTILS_ENABLE_DEPRECATED_SINCE(5,66) /** * @brief KCModuleContainer is a convenience class encapsulating several KCModules. * @@ -43,6 +44,8 @@ * call addModule for each module which should be displayed. When all calls to addModule is done, call * finalize() which performs some necessary final steps. * + * @deprecated since 5.66, no known users. + * * @author Frans Englich */ class KCMUTILS_EXPORT KCModuleContainer : public KCModule @@ -58,7 +61,9 @@ * KCModule is its service name, that is the name of the desktop file without * the ".desktop" part * + * @deprecated since 5.66, no known users. */ + KCMUTILS_DEPRECATED_VERSION(5, 66, "No known users") KCModuleContainer(QWidget *parent, const QStringList &mods); /** @@ -76,16 +81,22 @@ * @param parent The parent widget * @param mods The modules to load * @return The KCModule containing the requested modules. + * + * @deprecated since 5.66, no known users. */ + KCMUTILS_DEPRECATED_VERSION(5, 66, "No known users") explicit KCModuleContainer(QWidget *parent, const QString &mods = QString()); /** * Adds the specified module to the tab widget. Setting the tab icon, text, * tool tip, connecting the signals is what it does. * * @param module the name of the module to add. The name is the desktop file's name * without the ".desktop" part. + * + * @deprecated since 5.66, no known users. */ + KCMUTILS_DEPRECATED_VERSION(5, 66, "No known users") void addModule(const QString &module); /** @@ -140,6 +151,8 @@ * * @param modules the modules to put in the container * @param factoryName what factory name the module should have + * + * @deprecated since 5.66, no known users. */ #define KCMODULECONTAINER(modules, factoryName) \ class KCModuleContainer##factoryName : public KCModuleContainer \ @@ -154,5 +167,6 @@ registerPlugin(); \ ) +#endif #endif // KCMODULECONTAINER_H diff --git a/src/kcmodulecontainer.cpp b/src/kcmodulecontainer.cpp --- a/src/kcmodulecontainer.cpp +++ b/src/kcmodulecontainer.cpp @@ -31,6 +31,8 @@ typedef QList ModuleList; +#if KCMUTILS_BUILD_DEPRECATED_SINCE(5,66) + /***********************************************************************/ class Q_DECL_HIDDEN KCModuleContainer::KCModuleContainerPrivate { @@ -182,5 +184,7 @@ delete d; } +#endif + /***********************************************************************/