X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/3515582495f9aa02369a342d73c11079fcdcd654..b19b50fff1a17cca0443a6b09bd9caedca19f403:/src/settings/kcm/kcmdolphinnavigation.cpp diff --git a/src/settings/kcm/kcmdolphinnavigation.cpp b/src/settings/kcm/kcmdolphinnavigation.cpp index b56ce40c1..6f699f82d 100644 --- a/src/settings/kcm/kcmdolphinnavigation.cpp +++ b/src/settings/kcm/kcmdolphinnavigation.cpp @@ -1,51 +1,32 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz * - * * - * 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 * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ +/* + * SPDX-FileCopyrightText: 2009 Peter Penz + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kcmdolphinnavigation.h" -#include -#include +#include "settings/navigation/navigationsettingspage.h" +#include -#include +#include #include -K_PLUGIN_FACTORY(KCMDolphinNavigationConfigFactory, registerPlugin("dolphinnavigation");) -K_EXPORT_PLUGIN(KCMDolphinNavigationConfigFactory("kcmdolphinnavigation")) +K_PLUGIN_CLASS_WITH_JSON(DolphinNavigationConfigModule, "kcmdolphinnavigation.json") -DolphinNavigationConfigModule::DolphinNavigationConfigModule(QWidget* parent, const QVariantList& args) : - KCModule(parent), - m_navigation(0) +DolphinNavigationConfigModule::DolphinNavigationConfigModule(QObject *parent) + : KCModule(parent) + , m_navigation(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 | KCModule::Apply); - setButtons(KCModule::Default | KCModule::Help); + QVBoxLayout *topLayout = new QVBoxLayout(widget()); + topLayout->setContentsMargins(0, 0, 0, 0); - QVBoxLayout* topLayout = new QVBoxLayout(this); - topLayout->setMargin(0); - - m_navigation = new NavigationSettingsPage(this); - connect(m_navigation, &NavigationSettingsPage::changed, this, static_cast(&DolphinNavigationConfigModule::changed)); - topLayout->addWidget(m_navigation, 0, 0); + m_navigation = new NavigationSettingsPage(widget()); + connect(m_navigation, &NavigationSettingsPage::changed, this, &DolphinNavigationConfigModule::markAsChanged); + topLayout->addWidget(m_navigation, 0, {}); } DolphinNavigationConfigModule::~DolphinNavigationConfigModule() @@ -63,3 +44,5 @@ void DolphinNavigationConfigModule::defaults() } #include "kcmdolphinnavigation.moc" + +#include "moc_kcmdolphinnavigation.cpp"