File fix-some-more-KConfig-usage.patch of Package plasma5-desktop.openSUSE_13.2_Update
From: Hrvoje Senjan <hrvoje.senjan@gmail.com>
Date: Tue, 07 Apr 2015 18:48:38 +0000
Subject: Fix some more KConfig usage (wrt bug 340691)
X-Git-Tag: v5.2.95
X-Git-Url: http://quickgit.kde.org/?p=plasma-desktop.git&a=commitdiff&h=1c56fb2195511f4a2e5ff6e94d70dafedb11657e
---
Fix some more KConfig usage (wrt bug 340691)
We only need to sync the changes to kde4 kdeglobals once users
change the defaults, hence only users KF5 kdeglobals need to be evaluated.
This workarounds (though the change is IMO correct anyway) the kconfig bug,
as we can otherwise pass both local and systemwide kdeglobals into copyTo method.
REVIEW: 123288
---
--- a/kcms/componentchooser/componentchooserbrowser.cpp
+++ b/kcms/componentchooser/componentchooserbrowser.cpp
@@ -83,7 +83,8 @@
void CfgBrowser::save(KConfig *)
{
- KConfigGroup config(KSharedConfig::openConfig("kdeglobals"), QLatin1String("General") );
+ KSharedConfig::Ptr profile = KSharedConfig::openConfig("kdeglobals", KConfig::SimpleConfig);
+ KConfigGroup config(profile, QLatin1String("General"));
QString exec;
if (radioExec->isChecked())
{
--- a/kcms/componentchooser/componentchooserterminal.cpp
+++ b/kcms/componentchooser/componentchooserterminal.cpp
@@ -79,7 +79,8 @@
void CfgTerminalEmulator::save(KConfig *)
{
- KConfigGroup config(KSharedConfig::openConfig("kdeglobals"), "General");
+ KSharedConfig::Ptr profile = KSharedConfig::openConfig("kdeglobals", KConfig::SimpleConfig);
+ KConfigGroup config(profile, QLatin1String("General"));
const QString terminal = terminalCB->isChecked() ? "konsole" : terminalLE->text();
config.writePathEntry("TerminalApplication", terminal); // KConfig::Normal|KConfig::Global);
--- a/kcms/input/mouse.cpp
+++ b/kcms/input/mouse.cpp
@@ -527,10 +527,10 @@
settings->reverseScrollPolarity = generalTab->cbScrollPolarity->isChecked();
settings->apply();
- KConfig config( "kcminputrc" );
+ KConfig config( "kcminputrc", KConfig::SimpleConfig );
settings->save(&config);
- KConfig ac("kaccessrc");
+ KConfig ac("kaccessrc", KConfig::SimpleConfig);
KConfigGroup group = ac.group("Mouse");
@@ -791,7 +791,8 @@
Kdelibs4SharedConfig::syncConfigGroup(&group, "kinputrc");
- group = KConfigGroup(KSharedConfig::openConfig("kdeglobals"), "KDE");
+ KSharedConfig::Ptr profile = KSharedConfig::openConfig("kdeglobals", KConfig::SimpleConfig);
+ group = KConfigGroup(profile, "KDE");
group.writeEntry("DoubleClickInterval", doubleClickInterval, KConfig::Persistent);
group.writeEntry("StartDragTime", dragStartTime, KConfig::Persistent);
group.writeEntry("StartDragDist", dragStartDist, KConfig::Persistent);