Slows starting of downloading with KIO

Michael Brade brade at kde.org
Sun Jan 1 20:17:33 GMT 2006


On Friday 30 December 2005 15:53, David Faure wrote:
> On Thursday 22 December 2005 17:49, Michael Brade wrote:
> > yeah, almost.. kio would now use kdirlister_p.h. Ok, it's not that bad
> > since it's still not installed and exposed. But something to keep in
> > mind.
>
> Well, not if you add a KDirLister method like
> KFileItem* itemForURL( const KURL & )
> for me :)
> (static preferrably, but doesn't matter much)
Good point, we should make itemsForDir() static as well and rename it to 
itemsForURL(). And then make KDirLister::items() return all items for all 
urls of the lister, not only the items for the root url (I only noticed that 
now).

> Or I can use itemsForDir and extract the one I need; in both cases, no need
> for kdirlister_p.h
excellent ;-)

Which method to use. Well, not sure, itemForURL sounds good if we can make the 
lookup more efficient that way. Because if all you need is a file most of the 
time or even the whole contents of a directory then itemForURL wouldn't gain 
us much. But if you possibly need the directory item itself we might be 
better off with a new itemForURL method indeed. 

About the naming, it should be consistent: we have KDirLister::findByURL() and 
findByName() already. So call all static methods querying the global items 
item(s)*() and all methods operating on the files the KDirLister holds 
find*()? Suggestions?

-- 
Michael Brade;                 KDE Developer, Student of Computer Science
  |-mail: echo brade !#|tr -d "c oh"|s\e\d 's/e/\@/2;s/$/.org/;s/bra/k/2'
  °--web: http://www.kde.org/people/michaelb.html

KDE 3: The Next Generation in Desktop Experience
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060101/b2ddc612/attachment.sig>


More information about the kde-core-devel mailing list