KConfig Bug?

Waldo Bastian bastian at kde.org
Thu Jun 26 12:24:56 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 26 June 2003 00:05, Benjamin Meyer wrote:
> When I call KConfigBase::deleteEntry("foo") and entry foo exists in my
> global config a "foo[$d]" is created in the local config and from then on
> when I call readEntry("foo") it doesn't see the global config. 

That's correct. The entry is deleted, from an API point of view it behaves as 
if the entry has never existed. (Although you suggested in your cvs-commit 
that hasKey() still returns it, which would be a bug.)

> Now if I 
> change my deleteEntry("foo") to deleteEntry("foo", false, true) the local
> config foo line is removed entirely and the global config shows up by
> default on the next readEntry. 

That might be a bug.

> Now here is the confusing part: the 
> deleteEntry API doc states that the second bool statement:
>
> void KConfigBase::deleteEntry (
> const QString &   pKey,
> bool bNLS = false,
> bool bGlobal = false
> )
>  If bGlobal is true, the pair is not removed from the application specific
> config file, but to the global KDE config file.
>
> But it seems to be doing the opposite.  When false (by default) it will add
> the [$d] thus disabling the global entry and when true it removes the line
> entirely thus keeping the global entry.  Is this a bug?

That depends. If a global entry is defined (in $KDEDIR/share/kdeglobals) then 
it should add a [$d]-entry to $KDEHOME/share/kdeglobals to invalidate that 
entry. If there is NO global entry defined in $KDEDIR/share/kdeglobals then 
it is sufficient to just remove the entry from $KDEHOME/share/kdeglobals, if 
there was any.

Cheers,
Waldo
- -- 
bastian at kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE++tgIN4pvrENfboIRAlaRAKCdXXIzatgAHc3+/LZoVRh859t/WACdHTWn
QF/NNny/m5fvovN9XhOIYaE=
=Do88
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list