[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdelibs/kio/bookmarks
From:       David Faure <faure () kde ! org>
Date:       2005-02-09 11:33:46
Message-ID: 200502091233.46975.faure () kde ! org
[Download RAW message or body]

On Wednesday 09 February 2005 08:59, Frerich Raabe wrote:
> On Monday 07 February 2005 12:50, you wrote:
> > On Monday 31 January 2005 02:37, you wrote:
> > > +bool KBookmark::hasMetaData() const
> > >  {
> > >      QDomNode n = cd_or_create( internalElement(), "info" );
> > >      n = findOrCreateMetadata( n );
> > > +    return !n.firstChild().isNull();
> >
> > Creating an info or a metadata element from a const method looks rather
> > wrong to me.
> 
> How does it change the *observeable* state of the object?
 
I'm not nitpicking on const semantics.
I'm pointing out that your "hasMetaData" method creates <info> and <metadata>,
which obviously looks wrong: if the node didn't have metadata, there's no point
in creating those elements; this just bloats the XML.

-- 
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