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)
ki18n_wrap_ui(kcm_sdsummary_PART_SRCS sdsummaryconfig_base.ui)
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)
########### install files ###############
......
......@@ -14,16 +14,11 @@
#include <KConfig>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KPluginFactory>
extern "C" {
Q_DECL_EXPORT KCModule *create_sdsummary(QWidget *parent, const char *)
{
return new KCMSDSummary(parent);
}
}
KCMSDSummary::KCMSDSummary(QWidget *parent)
: KCModule(parent)
K_PLUGIN_FACTORY_WITH_JSON(KCMSDSummaryFactory, "kcmsdsummary.json", registerPlugin<KCMSDSummary>();)
KCMSDSummary::KCMSDSummary(QWidget *parent, const QVariantList &args)
: KCModule(parent, args)
{
setupUi(this);
......@@ -168,3 +163,4 @@ const KAboutData *KCMSDSummary::aboutData() const
return about;
}
#include "kcmsdsummary.moc"
......@@ -17,7 +17,7 @@ class KCMSDSummary : public KCModule, public Ui::SDSummaryConfig_Base
Q_OBJECT
public:
explicit KCMSDSummary(QWidget *parent = nullptr);
explicit KCMSDSummary(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