summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfilesystemwatcher
diff options
context:
space:
mode:
authorCory Bloor <cgbloor@ucalgary.ca>2014-12-09 23:17:59 -0700
committerCory Bloor <cgbloor@ucalgary.ca>2015-01-05 23:52:58 +0100
commitf38b7e0343dbf254034cb55188ac3287ed2931c6 (patch)
tree0116e0a1b7518f55b89a287d56e42e7fb34b663e /tests/auto/corelib/io/qfilesystemwatcher
parent4c1f66a0b2862784fa790deca36a70d885efb4e0 (diff)
Fix QFileSystemWatcher::directoryChanged docs/test
QFileSystemWatcher does not signal directoryChanged() when files are modified in a watched directory. QTBUG-8945 was closed with the decision that it should not signal. Updating the docs and tests to reflect this fact. The test code that is being changed is a partial revert of Qt4 commit 1428cc6d71a65c1ac7123c9c4cc3cfaf225cceed. It appears that Symbian supported directoryChanged() on modification, hence why the check was for 0 or 1. Change-Id: I04320c68f227ca338ce65e525956ee201fd50699 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'tests/auto/corelib/io/qfilesystemwatcher')
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 0a952e9452..7f0b2a4e26 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -460,18 +460,9 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
#endif
QTRY_VERIFY(fileChangedSpy.count() > 0);
-
- //according to Qt 4 documentation:
- //void QFileSystemWatcher::directoryChanged ( const QString & path ) [signal]
- //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.
- //Note that if there are several changes during a short period of time, some
- //of the changes might not emit this signal. However, the last change in the
- //sequence of changes will always generate this signal.
- QVERIFY(dirChangedSpy.count() < 2);
+ QCOMPARE(dirChangedSpy.count(), 0);
fileChangedSpy.clear();
- dirChangedSpy.clear();
QFile secondFile(secondFileName);
QVERIFY2(secondFile.open(QIODevice::WriteOnly | QIODevice::Truncate), msgFileOperationFailed("open", secondFile));
QVERIFY2(secondFile.write(QByteArrayLiteral("Foo")) > 0, msgFileOperationFailed("write", secondFile));