summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qmutex.cpp2
-rw-r--r--src/corelib/thread/qthread.cpp6
-rw-r--r--src/corelib/thread/qthread_win.cpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index f3883278e3..0508932d68 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -487,7 +487,7 @@ QRecursiveMutex::~QRecursiveMutex()
\fn QMutexLocker::QMutexLocker(QMutex *mutex)
Constructs a QMutexLocker and locks \a mutex. The mutex will be
- unlocked when the QMutexLocker is destroyed. If \a mutex is zero,
+ unlocked when the QMutexLocker is destroyed. If \a mutex is \nullptr,
QMutexLocker does nothing.
\sa QMutex::lock()
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 1437768f1c..155bff1758 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -614,7 +614,7 @@ void QThread::run()
priority.
The \a priority argument can be any value in the \c
- QThread::Priority enum except for \c InheritPriorty.
+ QThread::Priority enum except for \c InheritPriority.
The effect of the \a priority parameter is dependent on the
operating system's scheduling policy. In particular, the \a priority
@@ -626,6 +626,10 @@ void QThread::run()
*/
void QThread::setPriority(Priority priority)
{
+ if (priority == QThread::InheritPriority) {
+ qWarning("QThread::setPriority: Argument cannot be InheritPriority");
+ return;
+ }
Q_D(QThread);
QMutexLocker locker(&d->mutex);
if (!d->running) {
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 44cb5653bf..00d67b3a00 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -715,9 +715,7 @@ void QThreadPrivate::setPriority(QThread::Priority threadPriority)
prio = THREAD_PRIORITY_TIME_CRITICAL;
break;
- case QThread::InheritPriority:
default:
- qWarning("QThread::setPriority: Argument cannot be InheritPriority");
return;
}