Commit 83d47c38 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port kcmsdsummary to plugins system

parent 38867d43
Pipeline #61244 canceled with stage
...@@ -33,7 +33,7 @@ set(kcm_sdsummary_PART_SRCS kcmsdsummary.cpp) ...@@ -33,7 +33,7 @@ set(kcm_sdsummary_PART_SRCS kcmsdsummary.cpp)
ki18n_wrap_ui(kcm_sdsummary_PART_SRCS sdsummaryconfig_base.ui) ki18n_wrap_ui(kcm_sdsummary_PART_SRCS sdsummaryconfig_base.ui)
add_library(kcm_sdsummary MODULE ${kcm_sdsummary_PART_SRCS}) add_library(kcm_sdsummary MODULE ${kcm_sdsummary_PART_SRCS})
kcoreaddons_desktop_to_json(kcm_sdsummary "kcmsdsummary.desktop" SERVICE_TYPES kcmodule.desktop)
target_link_libraries(kcm_sdsummary Qt::Widgets KF5::KCMUtils KF5::I18n) target_link_libraries(kcm_sdsummary Qt::Widgets KF5::KCMUtils KF5::I18n)
########### install files ############### ########### install files ###############
......
...@@ -14,16 +14,11 @@ ...@@ -14,16 +14,11 @@
#include <KConfig> #include <KConfig>
#include <KConfigGroup> #include <KConfigGroup>
#include <KLocalizedString> #include <KLocalizedString>
#include <KPluginFactory>
extern "C" { K_PLUGIN_FACTORY_WITH_JSON(KCMSDSummaryFactory, "kcmsdsummary.json", registerPlugin<KCMSDSummary>();)
Q_DECL_EXPORT KCModule *create_sdsummary(QWidget *parent, const char *) KCMSDSummary::KCMSDSummary(QWidget *parent, const QVariantList &args)
{ : KCModule(parent, args)
return new KCMSDSummary(parent);
}
}
KCMSDSummary::KCMSDSummary(QWidget *parent)
: KCModule(parent)
{ {
setupUi(this); setupUi(this);
...@@ -168,3 +163,4 @@ const KAboutData *KCMSDSummary::aboutData() const ...@@ -168,3 +163,4 @@ const KAboutData *KCMSDSummary::aboutData() const
return about; return about;
} }
#include "kcmsdsummary.moc"
...@@ -17,7 +17,7 @@ class KCMSDSummary : public KCModule, public Ui::SDSummaryConfig_Base ...@@ -17,7 +17,7 @@ class KCMSDSummary : public KCModule, public Ui::SDSummaryConfig_Base
Q_OBJECT Q_OBJECT
public: public:
explicit KCMSDSummary(QWidget *parent = nullptr); explicit KCMSDSummary(QWidget *parent = nullptr, const QVariantList &args = {});
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