[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KConfigBase & TODO
From: David Faure <faure () kde ! org>
Date: 2005-12-13 8:57:54
Message-ID: 200512130957.54717.faure () kde ! org
[Download RAW message or body]
On Tuesday 13 December 2005 09:22, Thomas Braxton wrote:
> The TODO file has this entry
> - KConfigBase: For all the read*Entry methods that take a QFont *, QPoint *,
> QSize *, etc. for the default value, add overloads that use a const
> reference, so that one can write
> resize( config->readSizeEntry( "Bleh", size() ); for example. Constructing a
> null QFont/QPoint/QSize is cheap enough to justify a consistent and usable
> API (IMHO) .
> Keep source compatibility.
>
> I was wondering if this patch is correct and if so should I remove the item
> from the TODO file or just mark it as done when I commit?
Well, there was this other thread where it was said that we should clean up that
API and use only QVariant.
resize( config->readSizeEntry( "Bleh", size() ) );
would become
resize( config->readEntry( "Bleh", size() ).toSize() );
but the KConfigBase API would be very much simpler.
(And I withdraw my comment about speed, kconfig isn't as much used in
tight loops as e.g. KIO::UDSEntry is).
Maybe we can do this progressively, with a readVariantEntry, marking the
existing methods as deprecated, and then when most code has been ported
to readVariantEntry, we can just s/readEntry/readVariantEntry/ everywhere.
--
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic