summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorgunnar <gunnar@trolltech.com>2009-09-22 05:34:51 (GMT)
committergunnar <gunnar@trolltech.com>2009-09-22 16:53:41 (GMT)
commit0691350e14632dea6c12a2d37e605dc0628b4ceb (patch)
tree29893faa4f20c74acd49839d5436ea1cbe3bc721 /tests/auto
parent0d8d7427c8cc0d9b47a81ca8343773b0481b87ad (diff)
downloadQt-0691350e14632dea6c12a2d37e605dc0628b4ceb.zip
Qt-0691350e14632dea6c12a2d37e605dc0628b4ceb.tar.gz
Qt-0691350e14632dea6c12a2d37e605dc0628b4ceb.tar.bz2
Fixed crash in QFileSystemWatcher for addPath(nonExistingFile)
Reviewed-by: Eskil
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 9ab9d79..489a1ed 100644
--- a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -77,6 +77,8 @@ private slots:
void watchFileAndItsDirectory_data() { basicTest_data(); }
void watchFileAndItsDirectory();
+ void nonExistingFile();
+
void cleanup();
private:
QStringList do_force_engines;
@@ -525,5 +527,13 @@ void tst_QFileSystemWatcher::cleanup()
QDir().rmdir("testDir");
}
+void tst_QFileSystemWatcher::nonExistingFile()
+{
+ // Don't crash...
+ QFileSystemWatcher watcher;
+ watcher.addPath("file_that_does_not_exist.txt");
+ QVERIFY(true);
+}
+
QTEST_MAIN(tst_QFileSystemWatcher)
#include "tst_qfilesystemwatcher.moc"