strange problem with KConfig

Matthew Dawson matthew at mjdsystems.ca
Mon Feb 9 01:54:14 UTC 2015


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?id=343583
> 
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_kcm_workaround.diff
Type: text/x-patch
Size: 833 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150208/03434bd4/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150208/03434bd4/attachment.sig>


More information about the Kde-frameworks-devel mailing list