X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2744fb4a0b70cdff98c4f7e857247828cffe791e..885916b7b4:/src/settings/kcm/kcmdolphinservices.cpp diff --git a/src/settings/kcm/kcmdolphinservices.cpp b/src/settings/kcm/kcmdolphinservices.cpp index 87778dd81..e6a8867d7 100644 --- a/src/settings/kcm/kcmdolphinservices.cpp +++ b/src/settings/kcm/kcmdolphinservices.cpp @@ -19,37 +19,34 @@ #include "kcmdolphinservices.h" -#include -#include -#include +#include "settings/services/servicessettingspage.h" + +#include #include #include -#include - -#include #include -K_PLUGIN_FACTORY(KCMDolphinServicesConfigFactory, registerPlugin("dolphinservices");) -K_EXPORT_PLUGIN(KCMDolphinServicesConfigFactory("kcmdolphinservices")) +K_PLUGIN_FACTORY(KCMDolphinServicesConfigFactory, registerPlugin(QStringLiteral("dolphinservices"));) DolphinServicesConfigModule::DolphinServicesConfigModule(QWidget* parent, const QVariantList& args) : KCModule(parent), - m_services(0) + m_services(nullptr) { - Q_UNUSED(args); - - KGlobal::locale()->insertCatalog("dolphin"); + Q_UNUSED(args) 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(&DolphinServicesConfigModule::changed)); - topLayout->addWidget(m_services, 0, 0); +#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 64, 0) + connect(m_services, &ServicesSettingsPage::changed, this, QOverload<>::of(&DolphinServicesConfigModule::changed)); +#else + connect(m_services, &ServicesSettingsPage::changed, this, &DolphinServicesConfigModule::markAsChanged); +#endif + topLayout->addWidget(m_services, 0, {}); } DolphinServicesConfigModule::~DolphinServicesConfigModule()