diff options
author | Tijl Coosemans <tijl@coosemans.org> | 2010-11-26 10:11:13 +0100 |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2010-11-26 17:08:40 +0100 |
commit | b758e011a6d88448bf4c3db7f27cb4df773fd5e3 (patch) | |
tree | e8d5c8812c851be083f9d49ea3f4621baf7717c9 /tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp | |
parent | 0af0682ebbb70635f40dbed64d4cc678ade6bed2 (diff) | |
download | qt4-tools-b758e011a6d88448bf4c3db7f27cb4df773fd5e3.tar.gz |
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/tst_qfilesystemwatcher.cpp')
-rw-r--r-- | tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index a26e34d79f..3ed93fac38 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())); |