summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-05-03 15:49:15 +0200
committerLiang Qi <liang.qi@qt.io>2016-05-03 15:49:15 +0200
commit6357813207c866c99aadfd91af8fb3affe891f1d (patch)
tree69464d415b12ebaa3e57d88d7b5cd113878be988 /src/corelib/thread
parent5a76a3fb03f8d1dc8cb367de1a1dc6a37048376a (diff)
parentb3fcaea5f2b97d3f562add97aee48cbb469c875a (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: configure src/3rdparty/double-conversion/include/double-conversion/utils.h src/corelib/global/qnamespace.qdoc src/corelib/tools/qsimd_p.h tests/auto/corelib/io/qfile/tst_qfile.cpp Change-Id: I3ca1007bab5355d251c13002a18e93d81c254d34
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthread_p.h2
-rw-r--r--src/corelib/thread/qthreadpool.cpp2
-rw-r--r--src/corelib/thread/qwaitcondition_win.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index 5f7d01f50f..adcd98b609 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -121,7 +121,7 @@ public:
void addEvent(const QPostEvent &ev) {
int priority = ev.priority;
if (isEmpty() ||
- last().priority >= priority ||
+ constLast().priority >= priority ||
insertionOffset >= size()) {
// optimization: we can simply append if the last event in
// the queue has higher or equal priority
diff --git a/src/corelib/thread/qthreadpool.cpp b/src/corelib/thread/qthreadpool.cpp
index 9230854600..7ce757064f 100644
--- a/src/corelib/thread/qthreadpool.cpp
+++ b/src/corelib/thread/qthreadpool.cpp
@@ -228,7 +228,7 @@ int QThreadPoolPrivate::activeThreadCount() const
void QThreadPoolPrivate::tryToStartMoreThreads()
{
// try to push tasks on the queue to any available threads
- while (!queue.isEmpty() && tryStart(queue.first().first))
+ while (!queue.isEmpty() && tryStart(queue.constFirst().first))
queue.removeFirst();
}
diff --git a/src/corelib/thread/qwaitcondition_win.cpp b/src/corelib/thread/qwaitcondition_win.cpp
index 34db71808d..e6610f18c8 100644
--- a/src/corelib/thread/qwaitcondition_win.cpp
+++ b/src/corelib/thread/qwaitcondition_win.cpp
@@ -136,7 +136,7 @@ void QWaitConditionPrivate::post(QWaitConditionEvent *wce, bool ret)
// wakeups delivered after the timeout should be forwarded to the next waiter
if (!ret && wce->wokenUp && !queue.isEmpty()) {
- QWaitConditionEvent *other = queue.first();
+ QWaitConditionEvent *other = queue.constFirst();
SetEvent(other->event);
other->wokenUp = true;
}