summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfilesystemwatcher
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@coosemans.org>2010-11-26 09:11:13 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2010-11-26 09:11:13 (GMT)
commitfa2efd76019332e477f1117e3338d6f17c881968 (patch)
tree7f456756674cbccd25f78f80f4008a6ae3f3fbf3 /tests/auto/qfilesystemwatcher
parent58020d06ed5b3e7e429454e4dc267b4713a70d08 (diff)
downloadQt-fa2efd76019332e477f1117e3338d6f17c881968.zip
Qt-fa2efd76019332e477f1117e3338d6f17c881968.tar.gz
Qt-fa2efd76019332e477f1117e3338d6f17c881968.tar.bz2
tst_QFileSystemWatcher: Don't exit the event loop on first signal.
Sometimes tests can produce more than one signal and other times more than one signal would be an error. In order to test this the event loop should run long enough and not quit on the first signal. This is especially important on multicore systems where the application and worker threads run on different CPUs. Signals emitted by the worker thread are then almost immediately processed by the application thread. Merge-request: 2425 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'tests/auto/qfilesystemwatcher')
-rw-r--r--tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index fd898ee..82a6f88 100644
--- a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -141,10 +141,6 @@ void tst_QFileSystemWatcher::basicTest()
QSignalSpy changedSpy(&watcher, SIGNAL(fileChanged(const QString &)));
QEventLoop eventLoop;
- connect(&watcher,
- SIGNAL(fileChanged(const QString &)),
- &eventLoop,
- SLOT(quit()));
QTimer timer;
connect(&timer, SIGNAL(timeout()), &eventLoop, SLOT(quit()));
@@ -280,10 +276,6 @@ void tst_QFileSystemWatcher::watchDirectory()
QSignalSpy changedSpy(&watcher, SIGNAL(directoryChanged(const QString &)));
QEventLoop eventLoop;
- connect(&watcher,
- SIGNAL(directoryChanged(const QString &)),
- &eventLoop,
- SLOT(quit()));
QTimer timer;
connect(&timer, SIGNAL(timeout()), &eventLoop, SLOT(quit()));