readEntry and booleans

Thomas Braxton thomas_braxton at cox.net
Wed Jan 4 16:56:25 GMT 2006


On Wednesday 04 January 2006 03:48, David Faure wrote:
> On Wednesday 04 January 2006 09:49, Laurent Montel wrote:
> > On Wednesday 04 January 2006 09:45, David Faure wrote:
> > > On Wednesday 04 January 2006 02:24, Thomas Braxton wrote:
> > > > As far as I can tell this member template fixes everything
> > > > template <typename T> T readEntry(key, const T&) const
> > > >
> > > > This seems to work, I ran unsermake check on kdecore and it passes.
> > > > The only problem seems to be, all uses of QVariant::Bool/Int must be
> > > > replaced & toInt()/toBool() must be replaced to compile. All in all I
> > > > think the code looks a lot cleaner. You pass in a bool and you get
> > > > out a bool, so code that looked like this
> > > > if (sc.readEntry(key, QVariant::Bool).toBool())
> > > > now looks like this
> > > > if (sc.readEntry(key, false))
> > >
> > > Thanks for that fix. Too bad that we updated the snapshot before it
> > > though, it means we'll have to port the readEntry lines in the other
> > > modules twice...
> >
> > Perhaps we can recreate a snapshot today before that we port all module.
>
> I don't think current trunk should become snapshot - there are some
> compilation breakages due to the gettext/m4 stuff. But you could apply the
> readEntry change (rev 494162) to the snapshot. I'm just not sure the rest
> of kdelibs still compiles with this change, since it seems that only
> kdecore was ported?
yeah, I'm having problems compiling the rest of kdelibs so I haven't ported 
the rest yet. Working on that today.

Thomas




More information about the kde-core-devel mailing list