Details
-
Type:
Bug
-
Status: Reported
-
Priority:
P2: Important
-
Resolution: Unresolved
-
Affects Version/s: 5.11.2
-
Fix Version/s: None
-
Component/s: Core: Filesystem watching
-
Labels:None
-
Platform/s:
Description
Catching file change in following way:
QFileSystemWatcher watcher;
QFileInfo file(url.toLocalFile());
watcher.addPath(file.absoluteFilePath());
connect(&watcher, &QFileSystemWatcher::fileChanged, this, &MyClass::mySlot);
slot receives signal only once, then QFileSystemWatcher does not react on any file change. To catch file changes use following workaround - added following lines:
qmlWatcher.addPath(file.absolutePath());
connect(&watcher, &QFileSystemWatcher::directoryChanged, this, &MyClass::mySlot);
In this case able to catch all further file modifications.
Attachments
Issue Links
- duplicates
-
QTBUG-19350 QFileSystemWatcher unwatches file
-
- Closed
-
-
QTBUG-24898 QFileSystemWatcher (inotify) and editors that rename files
-
- Closed
-
- resulted in
-
QTBUG-71768 qmlpreview command line client fails to track replaced files
-
- Closed
-