summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthreadpool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qthreadpool.cpp')
-rw-r--r--src/corelib/thread/qthreadpool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp
index 1616fb9fab..a7d52f9652 100644
--- a/src/corelib/thread/qthreadpool.cpp
+++ b/src/corelib/thread/qthreadpool.cpp
@@ -215,7 +215,7 @@ void QThreadPoolPrivate::enqueueTask(QRunnable *runnable, int priority)
// put it on the queue
QList<QPair<QRunnable *, int> >::const_iterator begin = queue.constBegin();
QList<QPair<QRunnable *, int> >::const_iterator it = queue.constEnd();
- if (it != begin && priority < (*(it - 1)).second)
+ if (it != begin && priority > (*(it - 1)).second)
it = std::upper_bound(begin, --it, priority);
queue.insert(it - begin, qMakePair(runnable, priority));
runnableReady.wakeOne();