On February 5, 2015 08:49:16 PM Marco Martin wrote: > Hi all, > I was investigating this bug.. > https://bugs.kde.org/show_bug.cgi?id43583 > > but after digging and digging, it looks like more and more an issue in > KConfig.. > basically if there is a config file in a system-wide location (to give > default configs that would then be overridden by whatever other value in > ~/.config) I've investigated this further, and it does appear to be a bug in KConfig. I did some reductions on the look and feel kcm, to find what code responsible. It appears the foreach loop in krdb.cpp on line 683 triggers the funny writes. As that loop doesn't do anything odd, KConfig is definitely responsible. Hopefully this can be reduced down to a test case and then fixed.
However, I think the bug can be worked around in the short term for the kcm by having the KSharedConfigs in question use only the file they are pointed at. I think that is actually the correct behaviour, as those files are not supposed to use the global or system configuration files. I've attached a (relatively untested) sample patch. It fixes the bug, but I'm not sure if it allows the kcm to continue functioning as expected. -- Matthew
diff --git a/kcms/krdb/krdb.cpp b/kcms/krdb/krdb.cpp index 6838b21..5d92019 100644 --- a/kcms/krdb/krdb.cpp +++ b/kcms/krdb/krdb.cpp @@ -634,7 +634,7 @@ void runRdb( uint flags ) return; } - KConfig kde4config(configFilePath); + KConfig kde4config(configFilePath, KConfig::SimpleConfig); KConfigGroup kde4generalGroup(&kde4config, "General"); kde4generalGroup.writeEntry("ColorScheme", colorSchemeName); @@ -677,7 +677,7 @@ void runRdb( uint flags ) kde4IconGroup.sync(); //copy all the groups in the color scheme in kdeglobals - KSharedConfigPtr kde4ColorConfig = KSharedConfig::openConfig(src); + KSharedConfigPtr kde4ColorConfig = KSharedConfig::openConfig(src, KConfig::SimpleConfig); foreach (const QString &grp, kde4ColorConfig->groupList()) { KConfigGroup cg(kde4ColorConfig, grp);
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel