Tons of questions. And some patches

Tobias Koenig tokoe at kde.org
Sat Jan 24 16:33:56 GMT 2004


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
> +{
> +	QStringList ret;
> +	ret = readListEntry( pKey, sep );
> +	if ( ret.isEmpty() )
> +		return aDefault;
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.

> +QStringList KConfigBase::readListEntry( const char* pKey, const QString& aDefault,
> +		const char sep ) const
> +{
> +	QStringList ret;
> +	ret = readListEntry( pKey, sep );
> +	if( ret.isEmpty() )
> +		return aDefault;
Dito

Ciao,
Tobias
-- 
Can a government that shoots at reporters be democratic?
Separate politics from religion and economy!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040124/ad0177aa/attachment.sig>


More information about the kde-core-devel mailing list