]> 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 22e4e32ccfbfa0a06db0b898602fdcb8ba35d563..94494c184b38291118015a161e4182db1e1faefd 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2009 by Peter Penz <peter.penz@gmx.at>                  *
+ *   Copyright (C) 2009 by Peter Penz <peter.penz19@gmail.com>             *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
 
 #include "kcmdolphinservices.h"
 
-#include <ktabwidget.h>
-#include <kdialog.h>
-#include <klocale.h>
-#include <kpluginfactory.h>
-#include <kpluginloader.h>
+#include "settings/services/servicessettingspage.h"
 
-#include <settings/services/servicessettingspage.h>
+#include <KPluginFactory>
+#include <KPluginLoader>
 
 #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());
+    topLayout->setContentsMargins(0, 0, 0, 0);
 
     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, QOverload<>::of(&DolphinServicesConfigModule::changed));
+    topLayout->addWidget(m_services, 0, nullptr);
 }
 
 DolphinServicesConfigModule::~DolphinServicesConfigModule()