[PATCH] New KFileItem::assign() for Optimizing KDirListerCache
faure at kde.org
Fri Mar 25 14:27:00 GMT 2005
On Friday 25 March 2005 15:10, Michael Brade wrote:
> On Friday 25 March 2005 14:58, David Faure wrote:
> > OK - can we name it something else than assign, though, to remove some
> > possible confusion?
> Hm... if you think so, sure.
> > How about load? setData? update?
> > update() sounds best I guess. This is about updating the data in an
> > existing kfileitem.
> But I don't use it to update the item (which can also be confused with
> refresh) but rather to make it an entirely new item... The method is a
> shortcut for 'delete item; item = new KFileItem( udsEntry ... );'.
This sounds a bit weird :)
I mean, for any other class you wouldn't have a method for doing that, you would just do
*item = KFileItem( udsEntry... );
No new/delete there, only an instance created on the stack, and a call to the assignment operator.
> I tend to dislike assign, since I'd expect assigning from a KFileItem.
You can do that now, I added it after your problems with assign.
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel