From 518c85e91ec4eaec92b89a3303eaeb1c6cfdf3e0 Mon Sep 17 00:00:00 2001 From: Henri Chain Date: Mon, 9 Mar 2020 19:39:08 +0100 Subject: [PATCH] Remove default button on kwinrules KCM Summary: The "default" button was behaving the same as "reset" which was unnecessary and confusing. As the only settings are the list of rules, the only meaning "default" could have is to clear all the rules, which is probably not what the user would want. So I think the best course of action is to remove the button. Reviewers: zzag, meven, crossi, bport, ervin Reviewed By: zzag Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D28071 --- kcmkwin/kwinrules/kcm.cpp | 6 +----- kcmkwin/kwinrules/kcm.h | 1 - kcmkwin/kwinrules/ruleslist.cpp | 5 ----- kcmkwin/kwinrules/ruleslist.h | 1 - 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/kcmkwin/kwinrules/kcm.cpp b/kcmkwin/kwinrules/kcm.cpp index a18a188da8..d8f24df9b5 100644 --- a/kcmkwin/kwinrules/kcm.cpp +++ b/kcmkwin/kwinrules/kcm.cpp @@ -51,6 +51,7 @@ KCMRules::KCMRules(QWidget *parent, const QVariantList &) QString(), QString(), KAboutLicense::GPL, i18n("(c) 2004 KWin and KControl Authors")); about->addAuthor(i18n("Lubos Lunak"), QString(), "l.lunak@kde.org"); setAboutData(about); + setButtons(KCModule::Help | KCModule::Apply); } void KCMRules::load() @@ -70,11 +71,6 @@ void KCMRules::save() } -void KCMRules::defaults() -{ - widget->defaults(); -} - QString KCMRules::quickHelp() const { return i18n("

Window-specific Settings

Here you can customize window settings specifically only" diff --git a/kcmkwin/kwinrules/kcm.h b/kcmkwin/kwinrules/kcm.h index 7d0c462c94..b096b2e6b6 100644 --- a/kcmkwin/kwinrules/kcm.h +++ b/kcmkwin/kwinrules/kcm.h @@ -38,7 +38,6 @@ public: KCMRules(QWidget *parent, const QVariantList &args); void load() override; void save() override; - void defaults() override; QString quickHelp() const override; protected Q_SLOTS: void moduleChanged(bool state); diff --git a/kcmkwin/kwinrules/ruleslist.cpp b/kcmkwin/kwinrules/ruleslist.cpp index e2550f9b62..c74f7b62f7 100644 --- a/kcmkwin/kwinrules/ruleslist.cpp +++ b/kcmkwin/kwinrules/ruleslist.cpp @@ -229,10 +229,5 @@ void KCMRulesList::save() m_settings.save(); } -void KCMRulesList::defaults() -{ - load(); -} - } // namespace diff --git a/kcmkwin/kwinrules/ruleslist.h b/kcmkwin/kwinrules/ruleslist.h index 81e846777d..a8b21ffd4e 100644 --- a/kcmkwin/kwinrules/ruleslist.h +++ b/kcmkwin/kwinrules/ruleslist.h @@ -36,7 +36,6 @@ public: ~KCMRulesList() override; void load(); void save(); - void defaults(); Q_SIGNALS: void changed(bool); private Q_SLOTS: