Details
-
Sub-task
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
Win32 / Building with VS2005 / 32bit / Windows XP
Description
It does emit the signal when files are added to or removed from the directory. It does not fire the signal when existing files are modified. According to the documentation: http://doc.trolltech.com/4.6/qfilesystemwatcher.html#directoryChanged it should:
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.
This can be fixed by modifying qfilesystemwatcher_win.cpp:QWindowsFileSystemWatcherEngine::addPaths so that the flag
FILE_NOTIFY_CHANGE_LAST_WRITE
is added to the flags for directories as well as files so that the code becomes:
uint flags = isDir ? (FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_LAST_WRITE) : (FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_SECURITY);
I don't work on the other platforms I can't compare this behaviour to what they do.
Attachments
Issue Links
- depends on
-
QTBUG-3576 Unix/Linux: QFileSystemWatcher with Inotify doesn't detect modified files
-
- Closed
-
- relates to
-
QTBUG-38757 QFileSystemWatcher doesn't emit directoryChanged when a file in the watched folder is modified
-
- Closed
-
For Gerrit Dashboard: QTBUG-6524 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
19274,10 | WIP: new signals for QFileSystemWatcher | master | qt/qtbase | Status: ABANDONED | -2 | 0 |