Verified Commit 9ada31cb authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Port KNotesSummary away from KCM create function

parent f269d880
Pipeline #61243 passed with stage
in 6 minutes and 52 seconds
......@@ -50,7 +50,7 @@ kcoreaddons_desktop_to_json(kontact_knotesplugin knotesplugin.desktop)
set(kcm_knotessummary_PART_SRCS kcmknotessummary.cpp )
add_library(kcm_knotessummary MODULE ${kcm_knotessummary_PART_SRCS})
kcoreaddons_desktop_to_json(kcm_knotessummary "kcmknotessummary.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(kcm_knotessummary KF5::PimCommonAkonadi KF5::AkonadiNotes KF5::ConfigWidgets KF5::I18n)
......
......@@ -16,21 +16,17 @@
#include <KAcceleratorManager>
#include <KCheckableProxyModel>
#include <KLocalizedString>
#include <KPluginFactory>
#include <KSharedConfig>
#include <QCheckBox>
#include <QTreeView>
#include <QVBoxLayout>
extern "C" {
Q_DECL_EXPORT KCModule *create_knotessummary(QWidget *parent, const char *)
{
return new KCMKNotesSummary(parent);
}
}
K_PLUGIN_FACTORY_WITH_JSON(KCMKNotesSummaryFactory, "kcmknotessummary.json", registerPlugin<KCMKNotesSummary>();)
KCMKNotesSummary::KCMKNotesSummary(QWidget *parent)
: KCModule(parent)
KCMKNotesSummary::KCMKNotesSummary(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
initGUI();
......@@ -103,3 +99,5 @@ void KCMKNotesSummary::defaults()
{
Q_EMIT changed(true);
}
#include "kcmknotessummary.moc"
......@@ -22,7 +22,7 @@ class KCMKNotesSummary : public KCModule
Q_OBJECT
public:
explicit KCMKNotesSummary(QWidget *parent = nullptr);
explicit KCMKNotesSummary(QWidget *parent = nullptr, const QVariantList &args = QVariantList());
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