Commit 756f5e1b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to new plugin system

parent 32a2a0f4
Pipeline #61250 passed with stage
in 4 minutes and 45 seconds
......@@ -84,7 +84,7 @@ install(TARGETS kontact_bin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
set(kcm_kontact_PART_SRCS kcmkontact.cpp)
add_library(kcm_kontact MODULE ${kcm_kontact_PART_SRCS})
kcoreaddons_desktop_to_json(kcm_kontact "data/kontactconfig.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(kcm_kontact
KF5::I18n
KF5::KCMUtils
......
......@@ -14,6 +14,7 @@ using namespace Kontact;
#include <KAboutData>
#include <KLocalizedString>
#include <KPluginFactory>
#include <KPluginLoader>
#include <QComboBox>
......@@ -22,15 +23,9 @@ using namespace Kontact;
#include <QHBoxLayout>
#include <QStandardItemModel>
extern "C" {
Q_DECL_EXPORT KCModule *create_kontactconfig(QWidget *parent, const char *)
{
return new KcmKontact(parent);
}
}
KcmKontact::KcmKontact(QWidget *parent)
: KCModule(parent)
K_PLUGIN_FACTORY_WITH_JSON(KCMKontactSummaryFactory, "kontactconfig.json", registerPlugin<KcmKontact>();)
KcmKontact::KcmKontact(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
auto topLayout = new QVBoxLayout(this);
QBoxLayout *pluginStartupLayout = new QHBoxLayout();
......@@ -126,3 +121,4 @@ const KAboutData *KcmKontact::aboutData() const
return about;
}
#include "kcmkontact.moc"
......@@ -20,7 +20,7 @@ class KcmKontact : public KCModule
Q_OBJECT
public:
explicit KcmKontact(QWidget *parent = nullptr);
explicit KcmKontact(QWidget *parent = nullptr, const QVariantList &args = {});
void load() override;
void save() override;
......
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