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