diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ include(ECMQtDeclareLoggingCategory) include(ECMPoQmTools) include(ECMAddQch) +include(ECMGenerateExportHeader) option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -83,9 +83,18 @@ configure_file(config-knotifications.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-knotifications.h ) add_library(KF5Notifications ${knotifications_SRCS}) -generate_export_header(KF5Notifications BASE_NAME KNotifications) add_library(KF5::Notifications ALIAS KF5Notifications) +ecm_generate_export_header(KF5Notifications + EXPORT_FILE_NAME knotifications_export.h + BASE_NAME KNotifications + GROUP_BASE_NAME KF + VERSION ${KF5_VERSION} + DEPRECATED_BASE_VERSION 0 + DEPRECATION_VERSIONS 5.67 + EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} +) + target_include_directories(KF5Notifications INTERFACE "$") target_link_libraries(KF5Notifications PUBLIC diff --git a/src/knotification.h b/src/knotification.h --- a/src/knotification.h +++ b/src/knotification.h @@ -619,11 +619,15 @@ */ void close(); +#if KNOTIFICATIONS_ENABLE_DEPRECATED_SINCE(5, 67) /** * @brief Raise the widget. * This will change the desktop, activate the window, and the tab if needed. + * @deprecated since 5.67, use QWindow raise + requestActivate instead. */ + KNOTIFICATIONS_DEPRECATED_VERSION(5, 67, "Use QWindow raise + requestActivate instead") void raiseWidget(); +#endif /** * The notification will automatically be closed if all presentations are finished. diff --git a/src/knotification.cpp b/src/knotification.cpp --- a/src/knotification.cpp +++ b/src/knotification.cpp @@ -340,14 +340,16 @@ } } +#if KNOTIFICATIONS_BUILD_DEPRECATED_SINCE(5, 67) void KNotification::raiseWidget() { if (!d->widget) { return; } Private::raiseWidget(d->widget); } +#endif void KNotification::Private::raiseWidget(QWidget *w) {