[Kde-games-devel] KDE/kdegames/libkdegames
Albert Astals Cid
aacid at kde.org
Mon Oct 6 23:47:31 CEST 2008
A Dilluns 06 Octubre 2008, Parker Coates va escriure:
> 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.
Having had a second look it seems your code is probably ok.
Thanks :-)
Albert
>
> Parker
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel
More information about the kde-games-devel
mailing list