Commit 9f2e2d1e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Autogenerate categories file

parent f4053c23
......@@ -97,7 +97,15 @@ add_definitions(-DQT_NO_FOREACH)
add_subdirectory(src)
add_subdirectory(kontactplugin)
install(FILES kaddressbook.renamecategories kaddressbook.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
if (ECM_VERSION VERSION_LESS "5.68.0")
install(FILES kaddressbook.renamecategories kaddressbook.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
else ()
ecm_qt_install_logging_categories(
EXPORT KADDRESSBOOK
FILE kaddressbook.categories
DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
)
endif()
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
if(KF5DocTools_FOUND)
......
org.kde.pim.kaddressbook kaddressbook (kaddressbook) IDENTIFIER [KADDRESSBOOK_LOG]
org.kde.pim.kaddressbook_plugin kaddressbook (kaddressbook kontact plugins) IDENTIFIER [KADDRESSBOOKPLUGIN_LOG]
org.kde.pim.kaddressbook_configure kaddressbook (kaddressbook configure) IDENTIFIER [KADDRESSBOOK_CONFIGURE_LOG]
......@@ -3,7 +3,15 @@ include_directories(${kaddressbook_SOURCE_DIR})
set(kontact_kaddressbookplugin_PART_SRCS
kaddressbook_plugin.cpp
)
ecm_qt_declare_logging_category(kontact_kaddressbookplugin_PART_SRCS HEADER kaddressbookplugin_debug.h IDENTIFIER KADDRESSBOOKPLUGIN_LOG CATEGORY_NAME org.kde.pim.kaddressbook_plugin)
if (ECM_VERSION VERSION_LESS "5.68.0")
ecm_qt_declare_logging_category(kontact_kaddressbookplugin_PART_SRCS HEADER kaddressbookplugin_debug.h IDENTIFIER KADDRESSBOOKPLUGIN_LOG CATEGORY_NAME org.kde.pim.kaddressbook_plugin)
else()
ecm_qt_declare_logging_category(kontact_kaddressbookplugin_PART_SRCS HEADER kaddressbookplugin_debug.h IDENTIFIER KADDRESSBOOKPLUGIN_LOG CATEGORY_NAME org.kde.pim.kaddressbook_plugin
DESCRIPTION "kaddressbook (kaddressbook kontact plugins)"
OLD_CATEGORY_NAMES log_kaddressbook_plugin
EXPORT KADDRESSBOOK
)
endif()
qt5_add_dbus_interfaces(kontact_kaddressbookplugin_PART_SRCS ../src/org.kde.kaddressbook.xml)
......
......@@ -62,7 +62,16 @@ set(kaddressbook_LIB_SRCS
${kaddressbook_plugin_SRCS}
)
ecm_qt_declare_logging_category(kaddressbook_LIB_SRCS HEADER kaddressbook_debug.h IDENTIFIER KADDRESSBOOK_LOG CATEGORY_NAME org.kde.pim.kaddressbook)
if (ECM_VERSION VERSION_LESS "5.68.0")
ecm_qt_declare_logging_category(kaddressbook_LIB_SRCS HEADER kaddressbook_debug.h IDENTIFIER KADDRESSBOOK_LOG CATEGORY_NAME org.kde.pim.kaddressbook)
else()
ecm_qt_declare_logging_category(kaddressbook_LIB_SRCS HEADER kaddressbook_debug.h IDENTIFIER KADDRESSBOOK_LOG CATEGORY_NAME org.kde.pim.kaddressbook
DESCRIPTION "kaddressbook (kaddressbook)"
OLD_CATEGORY_NAMES log_kaddressbook
EXPORT KADDRESSBOOK
)
endif()
qt5_add_dbus_adaptor( kaddressbook_LIB_SRCS org.kde.kaddressbook.xml mainwidget.h MainWidget)
......
......@@ -2,9 +2,17 @@
set(kcm_config_plugins_SRCS
kaddressbook_config_plugins.cpp
kaddressbookconfigpluginlistwidget.cpp
../plugininterface/kaddressbookplugininterface.cpp
)
ecm_qt_declare_logging_category(kcm_config_plugins_SRCS HEADER kaddressbook_debug.h IDENTIFIER KADDRESSBOOK_LOG CATEGORY_NAME org.kde.pim.kaddressbook)
if (ECM_VERSION VERSION_LESS "5.68.0")
ecm_qt_declare_logging_category(kcm_config_plugins_SRCS HEADER kaddressbook_configure_debug.h IDENTIFIER KADDRESSBOOK_CONFIGURE_LOG CATEGORY_NAME org.kde.pim.kaddressbook_configure)
else()
ecm_qt_declare_logging_category(kcm_config_plugins_SRCS HEADER kaddressbook_configure_debug.h IDENTIFIER KADDRESSBOOK_CONFIGURE_LOG CATEGORY_NAME org.kde.pim.kaddressbook_configure
DESCRIPTION "kaddressbook (configure)"
EXPORT KADDRESSBOOK
)
endif()
add_library(kaddressbook_config_plugins MODULE ${kcm_config_plugins_SRCS})
......
......@@ -21,7 +21,7 @@
#include "../plugininterface/kaddressbookplugininterface.h"
#include <KAddressBookImportExport/KAddressBookImportExportPluginManager>
#include <KAddressBookImportExport/KAddressBookImportExportPlugin>
#include "kaddressbook_debug.h"
#include "kaddressbook_configure_debug.h"
#include <KLocalizedString>
#include <PimCommon/GenericPlugin>
......@@ -100,7 +100,7 @@ void KAddressBookConfigPluginListWidget::slotConfigureClicked(const QString &con
KAddressBookImportExport::KAddressBookImportExportPlugin *plugin = KAddressBookImportExport::KAddressBookImportExportPluginManager::self()->pluginFromIdentifier(identifier);
plugin->showConfigureDialog(this);
} else {
qCWarning(KADDRESSBOOK_LOG) << "Unknown configureGroupName" << configureGroupName;
qCWarning(KADDRESSBOOK_CONFIGURE_LOG) << "Unknown configureGroupName" << configureGroupName;
}
}
}
......@@ -25,7 +25,12 @@
#include <PimCommonAkonadi/GenericPluginInterface>
#include <pimcommonakonadi/plugininterface.h>
class MainWidget;
class KAddressBookPluginInterface : public PimCommon::PluginInterface
#include "kaddressbook_export.h"
#include <KAboutData>
class KADDRESSBOOK_EXPORT KAddressBookPluginInterface : public PimCommon::PluginInterface
{
Q_OBJECT
public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment