diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d77019d4..49dd1c244 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,7 +166,15 @@ add_subdirectory(src) add_subdirectory(agents) add_subdirectory(ktnef) add_subdirectory(kmail-refresh-settings) -install(FILES kmail.renamecategories kmail.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) +if (ECM_VERSION VERSION_LESS "5.68.0") + install(FILES kmail.renamecategories kmail.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) +else () + ecm_qt_install_logging_categories( + EXPORT KMAIL + FILE kmail.categories + DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} + ) +endif() add_subdirectory(doc) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/agents/archivemailagent/CMakeLists.txt b/agents/archivemailagent/CMakeLists.txt index 95c6249de..bb2abb7ef 100644 --- a/agents/archivemailagent/CMakeLists.txt +++ b/agents/archivemailagent/CMakeLists.txt @@ -15,7 +15,16 @@ kconfig_add_kcfg_files(libarchivemailagent_SRCS qt5_add_dbus_adaptor(libarchivemailagent_SRCS org.freedesktop.Akonadi.ArchiveMailAgent.xml archivemailagent.h ArchiveMailAgent) -ecm_qt_declare_logging_category(libarchivemailagent_SRCS HEADER archivemailagent_debug.h IDENTIFIER ARCHIVEMAILAGENT_LOG CATEGORY_NAME org.kde.pim.archivemailagent) +if (ECM_VERSION VERSION_LESS "5.68.0") + ecm_qt_declare_logging_category(libarchivemailagent_SRCS HEADER archivemailagent_debug.h IDENTIFIER ARCHIVEMAILAGENT_LOG CATEGORY_NAME org.kde.pim.archivemailagent) +else() + ecm_qt_declare_logging_category(libarchivemailagent_SRCS HEADER archivemailagent_debug.h IDENTIFIER ARCHIVEMAILAGENT_LOG CATEGORY_NAME org.kde.pim.archivemailagent + DESCRIPTION "kmail (archivemailagent)" + OLD_CATEGORY_NAMES log_archivemailagent + EXPORT KMAIL + ) +endif() + ki18n_wrap_ui(libarchivemailagent_SRCS ui/archivemailwidget.ui ) diff --git a/agents/archivemailagent/autotests/CMakeLists.txt b/agents/archivemailagent/autotests/CMakeLists.txt index 911529931..6f249bb5c 100644 --- a/agents/archivemailagent/autotests/CMakeLists.txt +++ b/agents/archivemailagent/autotests/CMakeLists.txt @@ -1,10 +1,21 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../.. ) +set(autotest_categories_SRCS) +if (ECM_VERSION VERSION_LESS "5.68.0") + ecm_qt_declare_logging_category(autotest_categories_SRCS HEADER archivemailagent_debug.h IDENTIFIER ARCHIVEMAILAGENT_LOG CATEGORY_NAME org.kde.pim.archivemailagent) +else() + ecm_qt_declare_logging_category(autotest_categories_SRCS HEADER archivemailagent_debug.h IDENTIFIER ARCHIVEMAILAGENT_LOG CATEGORY_NAME org.kde.pim.archivemailagent + DESCRIPTION "kmail (archivemailagent)" + OLD_CATEGORY_NAMES log_archivemailagent + EXPORT KMAIL + ) +endif() + + # Convenience macro to add unit tests. macro( archivemail_agent _source) - set( _test ${_source} ../archivemailwidget.cpp ../addarchivemaildialog.cpp ../widgets/formatcombobox.cpp ../widgets/unitcombobox.cpp) + set( _test ${_source} ../archivemailwidget.cpp ../addarchivemaildialog.cpp ../widgets/formatcombobox.cpp ../widgets/unitcombobox.cpp ${autotest_categories_SRCS}) ki18n_wrap_ui(_test ../ui/archivemailwidget.ui ) - ecm_qt_declare_logging_category(_test HEADER archivemailagent_debug.h IDENTIFIER ARCHIVEMAILAGENT_LOG CATEGORY_NAME org.kde.pim.archivemailagent) get_filename_component( _name ${_source} NAME_WE ) add_executable( ${_name} ${_test} ) add_test(NAME ${_name} COMMAND ${_name} ) diff --git a/agents/followupreminderagent/CMakeLists.txt b/agents/followupreminderagent/CMakeLists.txt index 9ae7eaa29..41e8bc825 100644 --- a/agents/followupreminderagent/CMakeLists.txt +++ b/agents/followupreminderagent/CMakeLists.txt @@ -13,7 +13,16 @@ set(followupreminderagent_SRCS ${followupreminderagent_job_SRCS} ) -ecm_qt_declare_logging_category(followupreminderagent_SRCS HEADER followupreminderagent_debug.h IDENTIFIER FOLLOWUPREMINDERAGENT_LOG CATEGORY_NAME org.kde.pim.followupreminderagent) +if (ECM_VERSION VERSION_LESS "5.68.0") + ecm_qt_declare_logging_category(followupreminderagent_SRCS HEADER followupreminderagent_debug.h IDENTIFIER FOLLOWUPREMINDERAGENT_LOG CATEGORY_NAME org.kde.pim.followupreminderagent) +else() + ecm_qt_declare_logging_category(followupreminderagent_SRCS HEADER followupreminderagent_debug.h IDENTIFIER FOLLOWUPREMINDERAGENT_LOG CATEGORY_NAME org.kde.pim.followupreminderagent + DESCRIPTION "kmail (followupreminderagent)" + OLD_CATEGORY_NAMES log_followupreminderagent + EXPORT KMAIL + ) +endif() + qt5_add_dbus_adaptor(followupreminderagent_SRCS org.freedesktop.Akonadi.FollowUpReminder.xml followupreminderagent.h FollowUpReminderAgent) qt5_add_dbus_interface(followupreminderagent_SRCS org.freedesktop.Notifications.xml notifications_interface) diff --git a/agents/followupreminderagent/autotests/CMakeLists.txt b/agents/followupreminderagent/autotests/CMakeLists.txt index 11fa693f0..41b0c8fbe 100644 --- a/agents/followupreminderagent/autotests/CMakeLists.txt +++ b/agents/followupreminderagent/autotests/CMakeLists.txt @@ -2,10 +2,20 @@ set(followupreminderagent_test_SRCS) qt5_add_dbus_interface(followupreminderagent_test_SRCS ../org.freedesktop.Notifications.xml notifications_interface) qt5_add_dbus_interface(followupreminderagent_test_SRCS ../org.freedesktop.DBus.Properties.xml dbusproperties) +set(autotest_categories_followupreminderagent_SRCS) +if (ECM_VERSION VERSION_LESS "5.68.0") + ecm_qt_declare_logging_category(autotest_categories_followupreminderagent_SRCS HEADER followupreminderagent_debug.h IDENTIFIER FOLLOWUPREMINDERAGENT_LOG CATEGORY_NAME org.kde.pim.followupreminderagent) +else() + ecm_qt_declare_logging_category(autotest_categories_followupreminderagent_SRCS HEADER followupreminderagent_debug.h IDENTIFIER FOLLOWUPREMINDERAGENT_LOG CATEGORY_NAME org.kde.pim.followupreminderagent + DESCRIPTION "kmail (followupreminderagent)" + OLD_CATEGORY_NAMES log_followupreminderagent + EXPORT KMAIL + ) +endif() + # Convenience macro to add unit tests. macro( followupreminder_agent _source ) - set( _test ${_source} ../followupreminderinfowidget.cpp ../jobs/followupremindershowmessagejob.cpp ../followupremindernoanswerdialog.cpp ${followupreminderagent_test_SRCS}) - ecm_qt_declare_logging_category(_test HEADER followupreminderagent_debug.h IDENTIFIER FOLLOWUPREMINDERAGENT_LOG CATEGORY_NAME org.kde.pim.followupreminderagent) + set( _test ${_source} ../followupreminderinfowidget.cpp ../jobs/followupremindershowmessagejob.cpp ../followupremindernoanswerdialog.cpp ${followupreminderagent_test_SRCS} ${autotest_categories_followupreminderagent_SRCS}) get_filename_component( _name ${_source} NAME_WE ) ecm_add_test(${_test} TEST_NAME ${_name} diff --git a/agents/mailfilteragent/CMakeLists.txt b/agents/mailfilteragent/CMakeLists.txt index 126108bb3..fb6d91490 100644 --- a/agents/mailfilteragent/CMakeLists.txt +++ b/agents/mailfilteragent/CMakeLists.txt @@ -13,7 +13,16 @@ set(akonadi_mailfilter_agent_SRCS qt5_add_dbus_adaptor(akonadi_mailfilter_agent_SRCS org.freedesktop.Akonadi.MailFilterAgent.xml mailfilteragent.h MailFilterAgent) -ecm_qt_declare_logging_category(akonadi_mailfilter_agent_SRCS HEADER mailfilteragent_debug.h IDENTIFIER MAILFILTERAGENT_LOG CATEGORY_NAME org.kde.pim.mailfilteragent) +if (ECM_VERSION VERSION_LESS "5.68.0") + ecm_qt_declare_logging_category(akonadi_mailfilter_agent_SRCS HEADER mailfilteragent_debug.h IDENTIFIER MAILFILTERAGENT_LOG CATEGORY_NAME org.kde.pim.mailfilteragent) +else() + ecm_qt_declare_logging_category(akonadi_mailfilter_agent_SRCS HEADER mailfilteragent_debug.h IDENTIFIER MAILFILTERAGENT_LOG CATEGORY_NAME org.kde.pim.mailfilteragent + DESCRIPTION "kmail (mailfilter agent)" + OLD_CATEGORY_NAMES log_mailfilteragent + EXPORT KMAIL + ) +endif() + add_executable(akonadi_mailfilter_agent ${akonadi_mailfilter_agent_SRCS}) diff --git a/agents/sendlateragent/CMakeLists.txt b/agents/sendlateragent/CMakeLists.txt index 07d0ac3f3..906ecf52b 100644 --- a/agents/sendlateragent/CMakeLists.txt +++ b/agents/sendlateragent/CMakeLists.txt @@ -6,7 +6,16 @@ if(BUILD_TESTING) endif() set(sendlater_common_SRCS) -ecm_qt_declare_logging_category(sendlater_common_SRCS HEADER sendlateragent_debug.h IDENTIFIER SENDLATERAGENT_LOG CATEGORY_NAME org.kde.pim.sendlateragent) +if (ECM_VERSION VERSION_LESS "5.68.0") + ecm_qt_declare_logging_category(sendlater_common_SRCS HEADER sendlateragent_debug.h IDENTIFIER SENDLATERAGENT_LOG CATEGORY_NAME org.kde.pim.sendlateragent) +else() + ecm_qt_declare_logging_category(sendlater_common_SRCS HEADER sendlateragent_debug.h IDENTIFIER SENDLATERAGENT_LOG CATEGORY_NAME org.kde.pim.sendlateragent + DESCRIPTION "kmail (sendlateragent)" + OLD_CATEGORY_NAMES log_sendlateragent + EXPORT KMAIL + ) +endif() + set(sendlateragentconfig_SRCS sendlaterconfiguredialog.cpp diff --git a/agents/unifiedmailboxagent/CMakeLists.txt b/agents/unifiedmailboxagent/CMakeLists.txt index df8d8663e..670846c6b 100644 --- a/agents/unifiedmailboxagent/CMakeLists.txt +++ b/agents/unifiedmailboxagent/CMakeLists.txt @@ -13,7 +13,15 @@ set(unifiedmailbox_agent_SRCS settingsdialog.cpp mailkernel.cpp ) -ecm_qt_declare_logging_category(unifiedmailbox_agent_SRCS HEADER unifiedmailboxagent_debug.h IDENTIFIER UNIFIEDMAILBOXAGENT_LOG CATEGORY_NAME org.kde.pim.unifiedmailboxagent) +if (ECM_VERSION VERSION_LESS "5.68.0") + ecm_qt_declare_logging_category(unifiedmailbox_agent_SRCS HEADER unifiedmailboxagent_debug.h IDENTIFIER UNIFIEDMAILBOXAGENT_LOG CATEGORY_NAME org.kde.pim.unifiedmailboxagent) +else() + ecm_qt_declare_logging_category(unifiedmailbox_agent_SRCS HEADER unifiedmailboxagent_debug.h IDENTIFIER UNIFIEDMAILBOXAGENT_LOG CATEGORY_NAME org.kde.pim.unifiedmailboxagent + DESCRIPTION "kmail (unifiedmailboxagent)" + EXPORT KMAIL + ) +endif() + kconfig_add_kcfg_files(unifiedmailbox_agent_SRCS settings.kcfgc ) diff --git a/kmail-refresh-settings/CMakeLists.txt b/kmail-refresh-settings/CMakeLists.txt index 32744a5ef..291919067 100644 --- a/kmail-refresh-settings/CMakeLists.txt +++ b/kmail-refresh-settings/CMakeLists.txt @@ -6,7 +6,15 @@ set(kmail-refresh-settings_SRCS refreshsettingsfirstpage.cpp ) -ecm_qt_declare_logging_category(kmail-refresh-settings_SRCS HEADER kmail-refresh-settings_debug.h IDENTIFIER KMAIL_REFRESH_SETTINGS_LOG CATEGORY_NAME org.kde.pim.kmail_refresh_settings) +if (ECM_VERSION VERSION_LESS "5.68.0") + ecm_qt_declare_logging_category(kmail-refresh-settings_SRCS HEADER kmail-refresh-settings_debug.h IDENTIFIER KMAIL_REFRESH_SETTINGS_LOG CATEGORY_NAME org.kde.pim.kmail_refresh_settings) +else() + ecm_qt_declare_logging_category(kmail-refresh-settings_SRCS HEADER kmail-refresh-settings_debug.h IDENTIFIER KMAIL_REFRESH_SETTINGS_LOG CATEGORY_NAME org.kde.pim.kmail_refresh_settings + DESCRIPTION "kmail-refresh-settings" + EXPORT KMAIL + ) +endif() + add_executable(kmail-refresh-settings ${kmail-refresh-settings_SRCS}) target_link_libraries(kmail-refresh-settings KF5::I18n KF5::AkonadiWidgets KF5::DBusAddons KF5::Crash KF5::XmlGui) diff --git a/kmail.categories b/kmail.categories index 898accaa6..68e1e0e81 100644 --- a/kmail.categories +++ b/kmail.categories @@ -6,3 +6,4 @@ org.kde.pim.kmail_plugin kmail (kmail kontact plugins) IDENTIFIER [KMAILPLUGIN_L org.kde.pim.mailfilteragent kmail (mailfilter agent) IDENTIFIER [MAILFILTERAGENT_LOG] org.kde.pim.unifiedmailboxagent kmail (unifiedmailboxagent) IDENTIFIER [UNIFIEDMAILBOXAGENT_LOG] org.kde.pim.kmail_refresh_settings kmail-refresh-settings IDENTIFIER [KMAIL_REFRESH_SETTINGS_LOG] +org.kde.pim.ktnefapps ktnef IDENTIFIER [KTNEFAPPS_LOG] diff --git a/ktnef/src/CMakeLists.txt b/ktnef/src/CMakeLists.txt index 9666e7307..0fc136eb3 100644 --- a/ktnef/src/CMakeLists.txt +++ b/ktnef/src/CMakeLists.txt @@ -11,7 +11,16 @@ set(ktnef_SRCS qwmf.cpp ) qt5_add_resources(ktnef_SRCS ktnef.qrc) -ecm_qt_declare_logging_category(ktnef_SRCS HEADER ktnef_debug.h IDENTIFIER KTNEFAPPS_LOG CATEGORY_NAME org.kde.pim.ktnefapps) + +if (ECM_VERSION VERSION_LESS "5.68.0") + ecm_qt_declare_logging_category(ktnef_SRCS HEADER ktnef_debug.h IDENTIFIER KTNEFAPPS_LOG CATEGORY_NAME org.kde.pim.ktnefapps) +else() + ecm_qt_declare_logging_category(ktnef_SRCS HEADER ktnef_debug.h IDENTIFIER KTNEFAPPS_LOG CATEGORY_NAME org.kde.pim.ktnefapps + DESCRIPTION "kmail-refresh-settings" + EXPORT KMAIL + ) +endif() + file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/pics/hicolor/*-apps-ktnef.png") ecm_add_app_icon(ktnef_SRCS ICONS ${ICONS_SRCS}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e51398957..66cfb2072 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -194,7 +194,16 @@ if (TARGET KUserFeedbackWidgets) endif() set(kmail_common_SRCS) -ecm_qt_declare_logging_category(kmail_common_SRCS HEADER kmail_debug.h IDENTIFIER KMAIL_LOG CATEGORY_NAME org.kde.pim.kmail) +if (ECM_VERSION VERSION_LESS "5.68.0") + ecm_qt_declare_logging_category(kmail_common_SRCS HEADER kmail_debug.h IDENTIFIER KMAIL_LOG CATEGORY_NAME org.kde.pim.kmail) +else() + ecm_qt_declare_logging_category(kmail_common_SRCS HEADER kmail_debug.h IDENTIFIER KMAIL_LOG CATEGORY_NAME org.kde.pim.kmail + DESCRIPTION "kmail (kmail)" + OLD_CATEGORY_NAMES log_kmail + EXPORT KMAIL + ) +endif() + set(kmailprivate_LIB_SRCS ${kmail_common_SRCS} kmmainwin.cpp diff --git a/src/kontactplugin/kmail/CMakeLists.txt b/src/kontactplugin/kmail/CMakeLists.txt index 180d98868..f494968b7 100644 --- a/src/kontactplugin/kmail/CMakeLists.txt +++ b/src/kontactplugin/kmail/CMakeLists.txt @@ -1,7 +1,17 @@ ########### next target ############### set(kontact_kmail_plugins_interface_common_SRCS) -ecm_qt_declare_logging_category(kontact_kmail_plugins_interface_common_SRCS HEADER kmailplugin_debug.h IDENTIFIER KMAILPLUGIN_LOG CATEGORY_NAME org.kde.pim.kmail_plugin) + +if (ECM_VERSION VERSION_LESS "5.68.0") + ecm_qt_declare_logging_category(kontact_kmail_plugins_interface_common_SRCS HEADER kmailplugin_debug.h IDENTIFIER KMAILPLUGIN_LOG CATEGORY_NAME org.kde.pim.kmail_plugin) +else() + ecm_qt_declare_logging_category(kontact_kmail_plugins_interface_common_SRCS HEADER kmailplugin_debug.h IDENTIFIER KMAILPLUGIN_LOG CATEGORY_NAME org.kde.pim.kmail_plugin + DESCRIPTION "kmail (kmail kontact plugins)" + OLD_CATEGORY_NAMES log_kmail_plugin + EXPORT KMAIL + ) +endif() + set(kontact_kmail_plugins_interface_SRCS) qt5_add_dbus_interfaces(kontact_kmail_plugins_interface_SRCS ${kmail_BINARY_DIR}/src/org.kde.kmail.kmail.xml)