[Qt-interest] QFileSystemWatcher Question
Andreas Pakulat
apaku at gmx.de
Thu Aug 13 10:58:33 CEST 2009
On 13.08.09 03:23:27, Dave Gerlach wrote:
> Andreas Pakulat wrote:
> > On 12.08.09 23:08:13, Dave Gerlach wrote:
> >
> >> When you add a path to QFileSystemWatcher and then modify a file that is
> >> in the directory being watched, does the directoryChanged() signal fire?
> >> I thought it did in a past project I worked on but now it seems this is
> >> not so. Adding, renaming, and deleting files at the path causes the
> >> signal to fire but actually changing the contents of the file does not.
> >> Any thoughts on this?
> >>
> >
> > If this did happen in the past, then it was a bug. Changing the contents
> > of a file doesn't touch the parent directory in any way, hence sending
> > our a directory-changed signal would be wrong.
> >
> > Andreas
> >
> >
> Are you sure though? To take a line directly from the documentation for
> the directoryChanged() signal: " This signal is emitted when the
> directory at a specified /path/, is modified (e.g., when a file is
> added, modified or deleted) or removed from disk." Is this just a very
> misleading line, a documentation bug,
It could be some missing docs. If I understand the sources of
qfilesystemwacherprivate_inotify and _win correctly than you might get
notification about changed files on windows, but definetly not using
inotify on linux. So it could be a platform-specific thing, when you get
directoryChanged for modified files. A Qt expert in this area would know
for sure, I don't :(
Andreas
--
A day for firm decisions!!!!! Or is it?
More information about the Qt-interest-old
mailing list