X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/0bc919bd4758a84ccc0928ff784223984ec5df88..6072005ddce81b456fdcf2e77d5156a1d86f3686:/src/settings/kcm/kcmdolphingeneral.cpp diff --git a/src/settings/kcm/kcmdolphingeneral.cpp b/src/settings/kcm/kcmdolphingeneral.cpp index 032c2df4d..f2fb604b2 100644 --- a/src/settings/kcm/kcmdolphingeneral.cpp +++ b/src/settings/kcm/kcmdolphingeneral.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * 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 "kcmdolphingeneral.h" @@ -26,18 +13,17 @@ #include #include #include +#include #include #include K_PLUGIN_FACTORY(KCMDolphinGeneralConfigFactory, registerPlugin(QStringLiteral("dolphingeneral"));) -DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget* parent, const QVariantList& args) : - KCModule(parent), +DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget *parent, const QVariantList &args) : + KCModule(parent, args), m_pages() { - Q_UNUSED(args); - setButtons(KCModule::Default | KCModule::Help); QVBoxLayout* topLayout = new QVBoxLayout(this); @@ -48,23 +34,22 @@ DolphinGeneralConfigModule::DolphinGeneralConfigModule(QWidget* parent, const QV // initialize 'Behavior' tab BehaviorSettingsPage* behaviorPage = new BehaviorSettingsPage(QUrl::fromLocalFile(QDir::homePath()), tabWidget); tabWidget->addTab(behaviorPage, i18nc("@title:tab Behavior settings", "Behavior")); - connect(behaviorPage, &BehaviorSettingsPage::changed, this, QOverload<>::of(&DolphinGeneralConfigModule::changed)); + connect(behaviorPage, &BehaviorSettingsPage::changed, this, &DolphinGeneralConfigModule::markAsChanged); // initialize 'Previews' tab PreviewsSettingsPage* previewsPage = new PreviewsSettingsPage(tabWidget); tabWidget->addTab(previewsPage, i18nc("@title:tab Previews settings", "Previews")); - connect(previewsPage, &PreviewsSettingsPage::changed, this, QOverload<>::of(&DolphinGeneralConfigModule::changed)); + connect(previewsPage, &PreviewsSettingsPage::changed, this, &DolphinGeneralConfigModule::markAsChanged); // initialize 'Confirmations' tab ConfirmationsSettingsPage* confirmationsPage = new ConfirmationsSettingsPage(tabWidget); tabWidget->addTab(confirmationsPage, i18nc("@title:tab Confirmations settings", "Confirmations")); - connect(confirmationsPage, &ConfirmationsSettingsPage::changed, this, QOverload<>::of(&DolphinGeneralConfigModule::changed)); - + connect(confirmationsPage, &ConfirmationsSettingsPage::changed, this, &DolphinGeneralConfigModule::markAsChanged); m_pages.append(behaviorPage); m_pages.append(previewsPage); m_pages.append(confirmationsPage); - topLayout->addWidget(tabWidget, 0, nullptr); + topLayout->addWidget(tabWidget, 0, {}); } DolphinGeneralConfigModule::~DolphinGeneralConfigModule() @@ -73,14 +58,14 @@ DolphinGeneralConfigModule::~DolphinGeneralConfigModule() void DolphinGeneralConfigModule::save() { - foreach (SettingsPageBase* page, m_pages) { + for (SettingsPageBase* page : qAsConst(m_pages)) { page->applySettings(); } } void DolphinGeneralConfigModule::defaults() { - foreach (SettingsPageBase* page, m_pages) { + for (SettingsPageBase* page : qAsConst(m_pages)) { page->applySettings(); } }