summaryrefslogtreecommitdiffstats
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 16:08:40 (GMT)
commitb758e011a6d88448bf4c3db7f27cb4df773fd5e3 (patch)
treee8d5c8812c851be083f9d49ea3f4621baf7717c9
parent0af0682ebbb70635f40dbed64d4cc678ade6bed2 (diff)
downloadQt-b758e011a6d88448bf4c3db7f27cb4df773fd5e3.zip
Qt-b758e011a6d88448bf4c3db7f27cb4df773fd5e3.tar.gz
Qt-b758e011a6d88448bf4c3db7f27cb4df773fd5e3.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>
-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 a26e34d..3ed93fa 100644
--- a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -139,10 +139,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()));
@@ -278,10 +274,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()));