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>
bb10
Shawn Rutledge 2019-09-11 09:40:17 +02:00
parent 22742c5f21
commit da46ea92e5
1 changed files with 6 additions and 0 deletions

View File

@ -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()
*/