]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/kcm/kcmdolphinservices.cpp
Dolphin: Cleanup kcms
[dolphin.git] / src / settings / kcm / kcmdolphinservices.cpp
index 4885adf4f805bee5df2f671bdd6c59e9e8f6014d..92e71bae0eb8da71a2467533f529d760768a37c0 100644 (file)
 
 #include "kcmdolphinservices.h"
 
+#include "settings/services/servicessettingspage.h"
+
+#include <kconfigwidgets_version.h>
 #include <KPluginFactory>
 #include <KPluginLoader>
 
-#include <settings/services/servicessettingspage.h>
-
 #include <QVBoxLayout>
 
 K_PLUGIN_FACTORY(KCMDolphinServicesConfigFactory, registerPlugin<DolphinServicesConfigModule>(QStringLiteral("dolphinservices"));)
-K_EXPORT_PLUGIN(KCMDolphinServicesConfigFactory("kcmdolphinservices"))
 
 DolphinServicesConfigModule::DolphinServicesConfigModule(QWidget* parent, const QVariantList& args) :
-    KCModule(parent),
-    m_services(0)
+    KCModule(parent, args),
+    m_services(nullptr)
 {
-    Q_UNUSED(args);
-
     setButtons(KCModule::Default | KCModule::Help);
 
     QVBoxLayout* topLayout = new QVBoxLayout(this);
-    topLayout->setMargin(0);
+    topLayout->setContentsMargins(0, 0, 0, 0);
 
     m_services = new ServicesSettingsPage(this);
-    connect(m_services, &ServicesSettingsPage::changed, this, static_cast<void(DolphinServicesConfigModule::*)()>(&DolphinServicesConfigModule::changed));
-    topLayout->addWidget(m_services, 0, 0);
+    connect(m_services, &ServicesSettingsPage::changed, this, &DolphinServicesConfigModule::markAsChanged);
+    topLayout->addWidget(m_services, 0, {});
 }
 
 DolphinServicesConfigModule::~DolphinServicesConfigModule()