From kde-core-devel Thu Jun 26 04:56:03 2003 From: Benjamin Meyer Date: Thu, 26 Jun 2003 04:56:03 +0000 To: kde-core-devel Subject: Re: KConfig Bug? X-MARC-Message: https://marc.info/?l=kde-core-devel&m=105660341211614 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 25 June 2003 6:05 pm, 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. 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. 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? After wading > through KConfig the last few hours this is the best I can tell. If so who > do I report it too? I have gone through the code in kconfig/kconfiginibackend/kconfigbase and I am pretty sure that to do what the api says it should do, line 1176 of kconfigbase.cpp should be changed to "aEntryData.bGlobal = !bGlobal;" But I am nor the author nor any sort of an expert on kconfig and simply offer this up as a suggestion. - -Benjamin Meyer P.S. After changing KAutoConfig to match what is stated in kdelibs/kdecore/KCONFIG_DESIGN I was "flamed" and told to revert. If KCONFIG_DESIGN is incorrect and I should not be using kconfigbase class can someone please fix the design file because as a developer to spend time updating code to match the design doc only to be yelled at is really irritating. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE++nzr1rZ3LTw38vIRAlCrAJ0aYs8js4BZtIkGTGUvg4qjF70wswCgkDJC NebHEw3KDwG7ycGUcI8rkk0= =svcK -----END PGP SIGNATURE-----