]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/kcm/kcmdolphinservices.cpp
Get rid of ugly static_cast usages in connect() calls
[dolphin.git] / src / settings / kcm / kcmdolphinservices.cpp
index ff0b09318cd464e4713e4e431ab2cf21143b5c45..94494c184b38291118015a161e4182db1e1faefd 100644 (file)
 
 #include "kcmdolphinservices.h"
 
-#include <KTabWidget>
-#include <KDialog>
-#include <KLocalizedString>
+#include "settings/services/servicessettingspage.h"
+
 #include <KPluginFactory>
 #include <KPluginLoader>
-#include <KGlobal>
-
-#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(parent),
-    m_services(0)
+    m_services(nullptr)
 {
     Q_UNUSED(args);
 
-    //KF5 port: remove this line and define TRANSLATION_DOMAIN in CMakeLists.txt instead
-//KLocale::global()->insertCatalog("dolphin");
-
     setButtons(KCModule::Default | KCModule::Help);
 
     QVBoxLayout* topLayout = new QVBoxLayout(this);
-    topLayout->setMargin(0);
-    topLayout->setSpacing(KDialog::spacingHint());
+    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, QOverload<>::of(&DolphinServicesConfigModule::changed));
+    topLayout->addWidget(m_services, 0, nullptr);
 }
 
 DolphinServicesConfigModule::~DolphinServicesConfigModule()