readEntry and booleans

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Wed Jan 4 11:40:06 GMT 2006


> --- Ursprüngliche Nachricht ---
> Von: Olivier Goffart <ogoffart at kde.org>
> An: kde-core-devel at kde.org
> Betreff: Re: readEntry and booleans
> Datum: Wed, 4 Jan 2006 11:54:30 +0100
> 
> Le Mercredi 4 Janvier 2006 12:04, André Wöbbeking a écrit :
> > On Wednesday 04 January 2006 02:24, Thomas Braxton wrote:
> > > On Tuesday 03 January 2006 16:59, David Faure wrote:
> > > > On Tuesday 03 January 2006 23:00, Cornelius Schumacher wrote:
> > > > > compare
> > > > >   readEntry( "key", QVariant( false ) ).toBool()
> > > > > to
> > > > >   readBoolEntry( "key", false )
> > > >
> > > > Since booleans convert so badly to QVariant, maybe we should keep
> > > > readBoolEntry or add a readEntry( key, bool ) overload?
> > >
> > > The problem wasn't with booleans, it was with zeroes. (i.e.
> > > false/int(0)/uint(0))
> > >
> > > As far as I can tell this member template fixes everything
> > > template <typename T> T readEntry(key, const T&) const
> >
> > What happens for readEntry("bla", 0) now? In this case we've to use
> > int(0), double(0), and so on, right?
> 
> Or maybe  readEntry<double>("bla" , 0)
> 
> Note:  it seems that it mean that we will not be compatible with MSVC6 
> (according to http://doc.trolltech.com/4.0/qvariant.html#value )
> (Personally, I don't care)
We also don't care about this compiler ->
http://www.kdelibs.com/wiki/index.php/KDElibs3_Installation#Compiler

Christian

-- 
10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++




More information about the kde-core-devel mailing list