--nextPart1898926.4n2NM312Xv Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 ne= ed > 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= =20 public, every KDirLister user can query the items that are possibly held by= =20 another KDirLister, or worse, query the items that are only left in the=20 cache. Thus, those returned items might be deleted after the call to the=20 static method. More precisely: Anytime the control returns to the event loo= p,=20 even as soon as the next openURL() call. That I'm not too happy about, even= =20 though I put a big fat warning in the docu. If you know what you're doing=20 it's ok, but most of the time people don't :-| So another solution would be to make them protected and put relevant KIO=20 classes as friends. But then why through KDirLister at all? The safest=20 solution would still be to use kdirlister_p.h in KIO. After all,=20 KDirListerCache is a part of KIO. And thinking about this even more, apart from that in KIO, I don't think th= ere=20 is any other use for people to query globally listed items outside of their= =20 KDirListers. Thus, there should be no public access to those items. =2D-=20 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' =C2=B0--web: http://www.kde.org/people/michaelb.html KDE 4: Beyond Your Expectations --nextPart1898926.4n2NM312Xv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDuTzldK2tAWD5bo0RAtTGAKCd1/NzzIy6jNd/q8alKDaPv1db6gCgocd+ 9JfaPX/VmW8fCmC1mnTEWwI= =hSPW -----END PGP SIGNATURE----- --nextPart1898926.4n2NM312Xv--