Tons of questions. And some patches
frans.englich at telia.com
Sun Jan 25 14:41:11 GMT 2004
On Sunday 25 January 2004 01:47, John Firebaugh wrote:
> On Jan 24, 2004, at 8:33 AM, Tobias Koenig wrote:
> > On Sat, Jan 24, 2004 at 03:27:55PM +0100, Frans Englich wrote:
> > Hi Frans,
> >> +QStringList KConfigBase::readListEntry( const QString& pKey, const
> >> QString& aDefault,
> >> + const char sep) const
> The default type should match the result type, and const value
> parameters are non-idiomatic. In other words, this should be:
Attached is a new try, perhaps better. I removed the const for the 'char sep'
argument, but I don't understand why it's better that way. I don't see why
it's the idiomatic way(perhaps "idiomatic" has a special meaning in the c++
I further don't understand why there's convenience functions for
QString&/char* pKey - why not only the QString function?
It does not use QChar instead of char. Since all the other helper functions
use char I guess the conversions when passing the value around could result
in a mangled value. And switching everything to QChar would break BC and
should thus be a KDE4 change.. But I am equally convinced I have no idea of
what I'm talking about.
> QStringList readListEntry( const QString& pKey, const QStringList&
> aDefault, char sep )
> > Shouldn't it be
> > if ( !hasKey( pKey ) )
> > return aDefault;
> > else
> > return readListEntry( pKey, sep );
> > Otherwise when you save an empty list the default data will be read
> > next
> > time.
> Yes, that too.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2891 bytes
Desc: not available
More information about the kde-core-devel