[Kde-games-devel] KDE/kdegames/libkdegames
Parker Coates
parker.coates at gmail.com
Mon Oct 6 09:23:50 CEST 2008
On Mon, Oct 6, 2008 at 02:37, Albert Astals Cid <aacid at kde.org> wrote:
>> Fixed and cleaned up logic for selecting the last used theme.
>
> To be sincere i don't see how this can fix the problem as its the same written in a different way
Before we were pulling the KConfig object out of the KConfigSkeleton
and reading the theme entry from there. Since we weren't really using
the KConfigSkeleton, we didn't get a chance to use the default values.
So if the theme entry was at its default value (and therefore not
written to file) reading from the KConfig(Group) returned "". Reading
from the KConfigSkeletonItem takes the default value into
consideration.
If that doesn't make sense, let me know. I'm certainly not a KConfig
expert and could be going about this all wrong.
>> Regardless the new code should work the same as before, with the added
>> bonus that the "Theme" KConfig entry is no longer hardcoded to the
>> "General" group. As long as it's named "Theme", it will be found
>> automatically.
>
> I do no see why this is a bonus at all, groups are there for a reason, and you ignoring them can introduce subtle bugs, like i for example having a Theme entry in my Sounds group
>
> Unless you have a strong reason please revert that.
That's an excellent point that I hadn't considered. It's a good thing
someone is checking up on me. ;) But after looking into it, it seems
to be a non issue because The KConfig compiler doesn't allow entries
with duplicate names, even if they are in different groups. It stops
compilation with the message:
The name 'Theme' is not unique.
If you still think this is an issue, let me know.
Parker
More information about the kde-games-devel
mailing list