[Qt-interest] QFileSystemWatcher Question

Dave Gerlach dave at gigmax.com
Thu Aug 13 09:23:27 CEST 2009


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, or an actual bug in Qt? I just 
want to be sure before I implement this using platform specific API's 
and give up development time I don't have to.

Dave



More information about the Qt-interest-old mailing list