[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 22:41:06
[Download RAW message or body]
On Thursday 07 March 2002 21:27, Michael Brade wrote:
> Yes :) And that's what I wanted to prevent: using yet another malloc and
> creating a new Object as it will be done for every file...
KDirNotify::FilesChanged isn't called very often.
> Puhh... but this will result in some overhead which I don't know if it's worth
> it... everytime a DirNotify signal arrives we need to check for every file if
> it is listed in this damn QValueList<QValueList<blah>>. I'd rather not
> implement this one.
But it's much faster than re-listing the whole directory!
Typical use case for FilesChanged is changing the icon inside a .desktop
file, as I said. (including, emptying the trash, same effect).
In that case, looking for this file in the existing list of files is certainly much faster
than re-listing the whole dir, isn't it ?
> > A better example would be changing the icon of a file on the desktop twice
> > in a row, quite fast, on a very slow computer (if it's possible to do
> > something fast on such a computer ;). Anyway, "stop any jobs and restart"
> > is already done somewhere else, no ?
> Yes, I'd call it updateDirectory() ;-)
Ok, good enough for now I guess ;)
> > All of this leads to the question: how is the "those files have changed"
> > signal from KDirWatch handled?
> Incorrect... There's just refreshItem() called.
Hmm, so same kind of signal but different code? Not good. IMHO they should both
do a refreshItem (and skip if item not found because currently listing the dir),
or they should both do an updateDirectory().
--
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