summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-01-10 11:39:16 (GMT)
committerQt Commercial Integration <QtCommercial@digia.com>2012-01-31 10:24:42 (GMT)
commitceacc9f93e8672ee6f08b2283eb863e0b367ade5 (patch)
tree1cc424586d123586d7e4ba7d950da5f5340c79ed /src/corelib
parentdd5a778af3c75b8b12d3fb29fadacad2c1f69130 (diff)
downloadQt-ceacc9f93e8672ee6f08b2283eb863e0b367ade5.zip
Qt-ceacc9f93e8672ee6f08b2283eb863e0b367ade5.tar.gz
Qt-ceacc9f93e8672ee6f08b2283eb863e0b367ade5.tar.bz2
Fix reversed condition introduced in 9a6cfc07e5
Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/thread/qsemaphore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp
index 46c1a1d..acfd478 100644
--- a/src/corelib/thread/qsemaphore.cpp
+++ b/src/corelib/thread/qsemaphore.cpp
@@ -224,7 +224,7 @@ bool QSemaphore::tryAcquire(int n, int timeout)
timer.start();
while (n > d->avail) {
const qint64 elapsed = timer.elapsed();
- if (timeout - elapsed > 0
+ if (timeout - elapsed <= 0
|| !d->cond.wait(locker.mutex(), timeout - elapsed))
return false;
}