[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [PATCH] KDirLister: emitChanges, deleteItems
From: David Faure <david () mandrakesoft ! com>
Date: 2002-03-07 10:37:38
[Download RAW message or body]
On Thursday 07 March 2002 11:23, Michael Brade wrote:
> On Thursday 07 March 2002 11:05, David Faure wrote:
> > On Thursday 07 March 2002 10:48, Michael Brade wrote:
> > > On Thursday 07 March 2002 00:41, David Faure wrote:
> > > > A remark about your questions in the comments for FilesChanged.
> > >
> > > Whoops... forgot to remove them.
> >
> > You did well, this way we can discuss them ;)
> Ok, so there's one answer missing: where's the difference between
> KURL::directory() and KURL::path()? I had a short look at KURL's code but I
> only understood the code for directory() and I think the docu is not the best
> it could have ;)
Generally speaking directory() is about finding the directory containing that 'URL'.
If the URL points to a file, then it's quite obvious, directory() will return the path
to the parent directory.
The tricky case is if the URL itself points to a directory, in which case it depends
on the second bool passed to directory(), whether it should return the URL itself
(it's a directory) or its parent directory.
[Note that directory() returns a _path_, /foo/bar. Use setPath if making a URL from it.]
In your case, I suppose you want to make a special case of "the url is a directory"
anyway, to look into the 'root' items as well, for those?
> > Ok. What about looking for the item in the "items already created but not
> > yet emitted" buffer then? If it can be updated there, then the correct
> > version of the item will be emitted at the end of the listing (openURL or
> > update, doesn't matter). Then it's not even needed to emit refreshItems in
> > such a case.
> Hmm, right, I guess you mean the buffer in KDirListerCache::jobs. But I meant
> that the job itself picks up the item but does not emit entries() yet.
But it will emit it when it's complete, right ?
All that matters is that the item gets updated, the emission to the view can
wait until the next emit newItems(). Do I misunderstand what you say?
> Perhaps a very rare case we don't have to deal with?
Hmm, that's my line usually ;)
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic