diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-09-11 09:40:17 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-09-23 17:33:52 +0200 |
commit | da46ea92e537501c932343f65e11032a2f5984f3 (patch) | |
tree | 28ae9dd4545ef30a25cbe344163a551c80790ca1 /src/corelib/io | |
parent | 22742c5f21ba5d9396c08d40c2f4471ae3382387 (diff) |
doc: add a note to QFileSystemWatcher about files saved by re-creation
Fixes: QTBUG-46483
Fixes: QTBUG-53607
Change-Id: I434f177b35689d55aa1deea360bf7e6ae009ad68
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp index a4705136a2..54460aff77 100644 --- a/src/corelib/io/qfilesystemwatcher.cpp +++ b/src/corelib/io/qfilesystemwatcher.cpp @@ -451,6 +451,12 @@ QStringList QFileSystemWatcher::removePaths(const QStringList &paths) This signal is emitted when the file at the specified \a path is modified, renamed or removed from disk. + \note As a safety measure, many applications save an open file by + writing a new file and then deleting the old one. In your slot + function, you can check \c watcher.files().contains(path). + If it returns \c false, check whether the file still exists + and then call \c addPath() to continue watching it. + \sa directoryChanged() */ |