enum's & KConfigBase
frans.englich at telia.com
Tue Jan 17 12:13:52 GMT 2006
On Tuesday 17 January 2006 00:14, Stefan Teleman wrote:
> On Monday 16 January 2006 18:58, Thomas Braxton wrote:
> > True, but how many enums that are used in KDE would this really matter
> > for? If you had an enum that needed special handling you would just have
> > to write your own implementation of readEntry/writeEntry for that enum.
> > most enums in KDE that I've seen so far are more than compensated for
> > with an int, besides we aren't talking about the binary representation of
> > an enum, it's about the way it is saved as text in a config file.
> In an ideal world, it shouldn't matter much (definition of the Ideal World
> in this case: No Negative Enums :-).
> It does become a big huge mess when there's some enum initialized with a
> negative "magic" value,
Hold on.. you're saying the enum below is evil? Even if all I do is casting it
to an int, but never enter KConfig?
LessThan = -1,
Equal = 0,
GreaterThan = 1
(But I think Thomas have a point; this enum discussion is OT and not related
to the proposal.)
More information about the kde-core-devel