From f3060723e126909a19d221401a473d4e2d3999b7 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 19 Dec 2018 13:07:23 +0000 Subject: [PATCH] [kcmkwin/kwinrules] Don't include kdeglobals in rules config Summary: There's nothing relevant in kdeglobals and loading it can lead to noise when deleting groups that override a system default. We still cascade which will allow kiosk keys to work as well as relevant system defaults. Import/Export is unchanged as that already uses SimpleConfig which includes this flag. I don't know if it will fix the relevant issue in the bug or just reduce noise. CCBUG: 402139 Test Plan: Compiled. Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D17645 --- data/update_default_rules.cpp | 2 +- kcmkwin/kwinrules/kcm.cpp | 2 +- kcmkwin/kwinrules/main.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/update_default_rules.cpp b/data/update_default_rules.cpp index b607c8855e..ed96e7d987 100644 --- a/data/update_default_rules.cpp +++ b/data/update_default_rules.cpp @@ -40,7 +40,7 @@ int main( int argc, char* argv[] ) return 1; } KConfig src_cfg( file ); - KConfig dest_cfg( "kwinrulesrc" ); + KConfig dest_cfg("kwinrulesrc", KConfig::NoGlobals); KConfigGroup scg(&src_cfg, "General"); KConfigGroup dcg(&dest_cfg, "General"); int count = scg.readEntry( "count", 0 ); diff --git a/kcmkwin/kwinrules/kcm.cpp b/kcmkwin/kwinrules/kcm.cpp index 2a0ef2cf6f..11125f6487 100644 --- a/kcmkwin/kwinrules/kcm.cpp +++ b/kcmkwin/kwinrules/kcm.cpp @@ -39,7 +39,7 @@ namespace KWin KCMRules::KCMRules(QWidget *parent, const QVariantList &) : KCModule(parent) - , config("kwinrulesrc") + , config("kwinrulesrc", KConfig::NoGlobals) { QVBoxLayout *layout = new QVBoxLayout(this); layout->setMargin(0); diff --git a/kcmkwin/kwinrules/main.cpp b/kcmkwin/kwinrules/main.cpp index 0103bfc6cf..a13150711f 100644 --- a/kcmkwin/kwinrules/main.cpp +++ b/kcmkwin/kwinrules/main.cpp @@ -36,7 +36,7 @@ namespace KWin static void loadRules(QList< Rules* >& rules) { - KConfig _cfg("kwinrulesrc"); + KConfig _cfg("kwinrulesrc", KConfig::NoGlobals); KConfigGroup cfg(&_cfg, "General"); int count = cfg.readEntry("count", 0); for (int i = 1; @@ -50,7 +50,7 @@ static void loadRules(QList< Rules* >& rules) static void saveRules(const QList< Rules* >& rules) { - KConfig cfg("kwinrulesrc"); + KConfig cfg("kwinrulesrc", KConfig::NoGlobals); QStringList groups = cfg.groupList(); for (QStringList::ConstIterator it = groups.constBegin(); it != groups.constEnd();