Commit f7ed0716 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use K_PLUGIN_CLASS_WITH_JSON directly

parent 6e8c100a
Pipeline #66247 passed with stage
in 5 minutes and 10 seconds
......@@ -24,6 +24,7 @@ target_link_libraries(kaddressbook_config_plugins
KPimAddressbookImportExport
)
kcoreaddons_desktop_to_json(kaddressbook_config_plugins kaddressbook_config_plugins.desktop SERVICE_TYPES kcmodule.desktop)
install(FILES kaddressbook_config_plugins.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(TARGETS kaddressbook_config_plugins DESTINATION ${KDE_INSTALL_PLUGINDIR}/pim/kcms/kaddressbook)
......
......@@ -15,7 +15,7 @@
using namespace KAddressBook;
K_PLUGIN_FACTORY(KCMKaddressbookPluginsConfigFactory, registerPlugin<KCMKaddressbookPluginsConfig>();)
K_PLUGIN_CLASS_WITH_JSON(KCMKaddressbookPluginsConfig, "kaddressbook_config_plugins.json")
KCMKaddressbookPluginsConfig::KCMKaddressbookPluginsConfig(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
......
......@@ -16,7 +16,7 @@
using namespace KAddressBook;
K_PLUGIN_FACTORY(KCMKaddressbookUserFeedBackConfigFactory, registerPlugin<KCMKaddressbookUserFeedBackConfig>();)
K_PLUGIN_CLASS_WITH_JSON(KCMKaddressbookUserFeedBackConfig, "kaddressbook_config_userfeedback.json")
KCMKaddressbookUserFeedBackConfig::KCMKaddressbookUserFeedBackConfig(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
......
......@@ -15,6 +15,7 @@
#include "globalcontactmodel.h"
#include "kaddressbook_options.h"
#include "kaddressbookadaptor.h"
#include "kcmutils_version.h"
#include "manageshowcollectionproperties.h"
#include "modelcolumnmanager.h"
#include "printing/printingwizard.h"
......@@ -68,6 +69,8 @@
#include <KContacts/ContactGroup>
#include <KDescendantsProxyModel>
#include <KLocalizedString>
#include <KPluginLoader>
#include <KPluginMetaData>
#include <KSelectionProxyModel>
#include <KToggleAction>
#include <KXMLGUIClient>
......@@ -352,11 +355,14 @@ void MainWidget::configure()
QPointer<KCMultiDialog> dlg = new KCMultiDialog(this);
dlg->addModule(QStringLiteral("akonadicontact_actions"));
dlg->addModule(QStringLiteral("kcmldap"));
dlg->addModule(QStringLiteral("kaddressbook_config_plugins"));
#ifdef WITH_KUSERFEEDBACK
dlg->addModule(QStringLiteral("kaddressbook_config_userfeedback"));
const QVector<KPluginMetaData> availablePlugins = KPluginLoader::findPlugins(QStringLiteral("pim/kcms/kaddressbook"));
for (const KPluginMetaData &metaData : availablePlugins) {
#if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 84, 0)
dlg->addModule(metaData);
#else
dlg->addModule(metaData.pluginId());
#endif
}
dlg->exec();
delete dlg;
}
......
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