what happens when calling KDirWatch::addDir() multiple times with the same path?

René J.V. Bertin rjvbertin at gmail.com
Sat Nov 25 23:19:27 UTC 2017


Hi,

KDirWatch is mostly rather old code, does anyone really know why it does what it does?

For instance, watching a directory multiple times with KDW::addDir() results in as many "Added already watched Entry" debug messages but I can't get my head around the underlying goal. It's also not clear (as in undocumented) whether you'd need to call KDW::removeDir() the same number of times in order to stop watching the directory in question (I'm assuming you have to).

As a result I feel I need to wrap each call to KDW::addDir(foo) with a check of KDW::contains(foo).

Thanks!
René


More information about the Kde-frameworks-devel mailing list