[PATCH] kdirwatch.cpp

Main user of this system bruggie at home.nl
Tue Sep 24 23:59:10 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 23 Sep 2002, Josef Weidendorfer wrote:

Sorry for the somwhat late reply, my machine was totally corrupted, had to
reinstall everything :( Luckily i could keep my /home and /cvs partitions.

> Hi Otto,
>
> thanks for implementing this.
> Unfortunately their are some problems with your patch:
> - when deleting the recursive/watchFiles watch again, this only deletes the
> given directory. It should delete all other added files watches, too.

Yikes, i never bothered to check for this to be honest, I just added the
recursive and watchFiles in the adding of things to be watched because i
wanted that in Kompare, didnt bother to see what else was needed. But i'll
look into this.

> - the "recursive" and "watchFiles" option has to be dynamic, otherwise
> their is no use of implementing this in KDirWatch; your approach is static and
> only looks for files existing when adding the watch.
> E.g. if a file is created in directory of a watch entry with option
> "watchFiles", it should automatically be watched, too. And of course deleted
> with the original entry. Same holds for the "recursive" flag.

I understand. I'll see if i can implement this the right way. I assume
(without looking at the code, so i could be wrong) that it has to the new
directory entry (file or dir) to itself before it emits one of the 3
signals ? (BTW the docu is wrong imo, it talks about 3 additional signals
in the addDir docu that i cant find anywhere in the class).

> Before release of KDE 3.0, I added these flags, and started implementing
> something, but I didn't finished...
>
> BTW: Main use of the "recursive" flag would be in KDED, where recursive dirs
> are watched. Every time KDED detects a change, it deletes ALL watches and
> creates them again. This is much overhead for nothing. In KDirWatch, this
> could be done VERY efficient...

Ouch, that is indeed very inefficient. I can also use such a beast for
Kompare when one compares 2 directories :) I dont want to add every
file/directory manually (even files/dirs that currently dont have changes
should be watched if something changes in them).

> I'm waiting for your next patch :-)

I will try to mail something to you this weekend if time permits :)

> Josef

Otto
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Made with pgp4pine 1.75-6

iD8DBQE9kO5GDc93sltYd+ERAqH7AJ9ez8S5k4vysi/cYzhPF/lO7gfhLwCeItH0
jscEmYh3BhZEJhq6bpt6TW4=
=JdtV
-----END PGP SIGNATURE-----






More information about the kde-core-devel mailing list