summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthreadpool.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2012-09-18 22:41:59 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-19 16:12:33 +0200
commit8e3e34defd0e19d49be090046ba76decc2adb526 (patch)
tree800bc71b7a63e3886eca3e2e01734efc92713f44 /src/corelib/thread/qthreadpool.cpp
parent1e37d854f71a965ae34c41b7f437683db5e4b6fb (diff)
Remove qUpperBound usages from qtbase
Replace them with std::upper_bound; this allows for deprecation of qUpperBound. Change-Id: Idef01d2228b9a70eee3d52931d7aedb5bb6ba902 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/corelib/thread/qthreadpool.cpp')
-rw-r--r--src/corelib/thread/qthreadpool.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp
index ee1abc8636..0e9a12a695 100644
--- a/src/corelib/thread/qthreadpool.cpp
+++ b/src/corelib/thread/qthreadpool.cpp
@@ -43,6 +43,8 @@
#include "qthreadpool_p.h"
#include "qelapsedtimer.h"
+#include <algorithm>
+
#ifndef QT_NO_THREAD
QT_BEGIN_NAMESPACE
@@ -214,7 +216,7 @@ void QThreadPoolPrivate::enqueueTask(QRunnable *runnable, int priority)
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)
- it = qUpperBound(begin, --it, priority);
+ it = std::upper_bound(begin, --it, priority);
queue.insert(it - begin, qMakePair(runnable, priority));
runnableReady.wakeOne();
}