summaryrefslogtreecommitdiff
path: root/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@coosemans.org>2010-11-26 10:11:12 +0100
committerJoão Abecasis <joao.abecasis@nokia.com>2010-11-26 17:08:29 +0100
commit0af0682ebbb70635f40dbed64d4cc678ade6bed2 (patch)
treefd53aac5f1837fa30e351bbfd4a3f34286cdc8de /tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
parentf7feeee1733b6cb8bfcc157fff1e444068dc290c (diff)
downloadqt4-tools-0af0682ebbb70635f40dbed64d4cc678ade6bed2.tar.gz
QPollingFileSystemWatcherEngine: Fix double report of directory change.
The polling engine first retrieves a QFileInfo for a given path, then tests whether it's different from before and if so, stores the new file info and emits a signal. In case path is a directory the test also checks if the list of directory entries has changed. This creates a window between retrieving the file info and the test in which a file can be added/removed from the directory or the directory itself can be removed. In that case the test returns true, because the list of entries has changed, but outdated file info is stored which means that on the next timeout the same change will be reported a second time. Therefore, refresh the file info after the test for changes. Merge-request: 2425 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp')
0 files changed, 0 insertions, 0 deletions