QFileSystemWatcher vs KDirWatch

Andreas Pakulat apaku at gmx.de
Sat Jun 2 19:38:33 UTC 2007


On 02.06.07 21:47:13, Andras Mantia wrote:
> On Saturday 02 June 2007, Andreas Pakulat wrote:
> > On 02.06.07 20:27:13, Andras Mantia wrote:
> > > On Saturday 02 June 2007, Andreas Pakulat wrote:
> > > > As I tried to explain: KDirWatch uses questionable ways of
> > > > getting notified for changes. We just recently received a
> > > > bugreport for KDevelop3 from somebody who can't/want to switch
> > > > away from fam.
> > >
> > > I'm lost here, what are the KDirWatch problems? Were they presented
> > > on kde-core-devel?
> >
> > The most serious problem is that it uses a broken notification system
> > on *nix (fam/gamin). 
> Depends. It is a configure switch for kdelibs. 

Right, but distros use fam always and I doubt we can make them change my
mind. They didn't change their mind until now.

> It uses:
> - fam/gamin: if it was enabled and it is present
> - kernel (inotify, maybe dnotify)
> - polling
> 
> What does the Qt class use if not the ones above?	

It just doesn't use fam/gamin. It uses inotify if available, else it
polls.

> > Another problem is that various things are not 
> > implemented and some things are missing (for example stopping
> > watching of individual files).
> 
> KDirWatch::removeFile and KDirWatch::addFile works for me just fine in 
> KDE3.

Yes, but its a workaround for a broken implementation.

> > Yes I asked (quite some while ago) what the plans are for KDirWatch
> > on k-c-d, and IIRC the answer is: unless somebody steps up to work on
> > it it will stay as is.
> 
> Probably because it works for most cases and there was no need to change 
> it.

I can't seem to find the mails again (except those from k-c-d titles
qfilesystemwatcher vs. kdirwatch). You can find some information in
those. 

So even if the above is not all that serious there are two really
serious problems:

a) No Maintainer and seemingly few people that know the code
b) Not platform independent, that is it only works on *nix (maybe MacOS)
without polling. 

Andreas, who still thinks a wrapper around QFSWatcher is better than
KDirWatch.

-- 
You have no real enemies.




More information about the KDevelop-devel mailing list