Slows starting of downloading with KIO

Michael Brade brade at kde.org
Mon Jan 2 14:46:58 GMT 2006


On Friday 30 December 2005 15:53, David Faure 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)
>
> Or I can use itemsForDir and extract the one I need; in both cases, no need
> for kdirlister_p.h
>
> > On Tuesday 20 December 2005 15:00, Stephan Kulow wrote:
> > > Sounds like a nice crash source to me ;)
>
> Don't live in the past...
Actually, Coolo is (accidently) right. If we make those methods static and 
public, every KDirLister user can query the items that are possibly held by 
another KDirLister, or worse, query the items that are only left in the 
cache. Thus, those returned items might be deleted after the call to the 
static method. More precisely: Anytime the control returns to the event loop, 
even as soon as the next openURL() call. That I'm not too happy about, even 
though I put a big fat warning in the docu. If you know what you're doing 
it's ok, but most of the time people don't :-|

So another solution would be to make them protected and put relevant KIO 
classes as friends. But then why through KDirLister at all? The safest 
solution would still be to use kdirlister_p.h in KIO. After all, 
KDirListerCache is a part of KIO.

And thinking about this even more, apart from that in KIO, I don't think there 
is any other use for people to query globally listed items outside of their 
KDirListers. Thus, there should be no public access to those items.

-- 
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 4: Beyond Your Expectations
-------------- 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/20060102/8dd79653/attachment.sig>


More information about the kde-core-devel mailing list