KConfig borkage

Thomas Braxton kde.braxton at gmail.com
Sun Oct 28 08:28:19 GMT 2007


On 10/28/07, Jeff Mitchell <kde-dev at emailgoeshere.com> wrote:
>
> I'm seeing some odd, reproduceable behavior in my amarokrc file.  kdelibs
> was
> built from SVN about 12 hours ago.
>
> There is a [PortableDevices] section that is occasionally added to or
> deleted
> from.  The problem is that whenever the last (positionally, not
> numerically)
> entry is removed, it's not actually removed, but rather gets corrupted
> somehow.


actually is not getting corrupted, it's being marked as deleted.

Example:
>
> If I start out with this:
>
> [PortableDevices]
> manual|mtp|(null)=mtp-mediadevice
> manual|generic|/mnt/usbdisk=generic-mediadevice
>
> and in my program I run code to remove the first entry:
>
> KConfigGroup config = Amarok::config( "PortableDevices" );
> config.deleteEntry( "manual|mtp|(null)" );
>
> then after the program exits I'm left with:
>
> [PortableDevices]
> manual|generic|/mnt/usbdisk=generic-mediadevice
>
> as expected.  However, if I then run code to remove the other device:
>
> KConfigGroup config = Amarok::config( "PortableDevices" );
> config.deleteEntry( "manual|generic|/mnt/usbdisk" );
>
> then when the program exits I'm left with:
>
> [PortableDevices]
> manual|generic|/mnt/usbdisk[$d]
>
> Which isn't what I expect.
>
> Similarly, if I start out with:
>
> [PortableDevices]
> manual|generic|/mnt/usbdisk=generic-mediadevice
> manual|mtp|(null)=mtp-mediadevice
>
> and run code to remove the second one, I'm left with the following:
>
> [PortableDevices]
> manual|generic|/mnt/usbdisk=generic-mediadevice
> manual|mtp|(null)[$d]
>
> Is this expected behavior, or is something wonky in KConfig?


Is there a default set for those keys in KDEDIR/share/config/amarokrc?
because the entries shouldn't be marked as deleted unless there was a
default, I'll look into this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071028/e37a141e/attachment.htm>


More information about the kde-core-devel mailing list