]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/kcm/kcmdolphinservices.cpp
[PlacesItemModelTest] Check whether Desktop and Download folders exist
[dolphin.git] / src / settings / kcm / kcmdolphinservices.cpp
index 6d8c76192b38472993b72fa05df067fc07886dbc..202bc5cf5decc7ebbced37fe766481a59186c6ea 100644 (file)
 
 #include "kcmdolphinservices.h"
 
-#include <KTabWidget>
-#include <KDialog>
-#include <KLocale>
+#include "settings/services/servicessettingspage.h"
+
 #include <KPluginFactory>
 #include <KPluginLoader>
 
-#include <settings/services/servicessettingspage.h>
-
 #include <QVBoxLayout>
 
-K_PLUGIN_FACTORY(KCMDolphinServicesConfigFactory, registerPlugin<DolphinServicesConfigModule>("dolphinservices");)
-K_EXPORT_PLUGIN(KCMDolphinServicesConfigFactory("kcmdolphinservices"))
+K_PLUGIN_FACTORY(KCMDolphinServicesConfigFactory, registerPlugin<DolphinServicesConfigModule>(QStringLiteral("dolphinservices"));)
 
 DolphinServicesConfigModule::DolphinServicesConfigModule(QWidget* parent, const QVariantList& args) :
-    KCModule(KCMDolphinServicesConfigFactory::componentData(), parent),
-    m_services(0)
+    KCModule(parent),
+    m_services(nullptr)
 {
     Q_UNUSED(args);
 
-    KGlobal::locale()->insertCatalog("dolphin");
-
     setButtons(KCModule::Default | KCModule::Help);
 
     QVBoxLayout* topLayout = new QVBoxLayout(this);
     topLayout->setMargin(0);
-    topLayout->setSpacing(KDialog::spacingHint());
 
     m_services = new ServicesSettingsPage(this);
-    connect(m_services, SIGNAL(changed()), this, SLOT(changed()));
-    topLayout->addWidget(m_services, 0, 0);
+    connect(m_services, &ServicesSettingsPage::changed, this, static_cast<void(DolphinServicesConfigModule::*)()>(&DolphinServicesConfigModule::changed));
+    topLayout->addWidget(m_services, 0, nullptr);
 }
 
 DolphinServicesConfigModule::~DolphinServicesConfigModule()