summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
-rw-r--r--src/corelib/thread/qthread.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index ea76a2ccada..738c3846c53 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -438,7 +438,7 @@ QThread *QThread::currentThread()
\sa currentThread(), QCoreApplication::instance()
*/
-bool QThread::isMainThread()
+bool QThread::isMainThread() noexcept
{
return currentThreadId() == QCoreApplicationPrivate::theMainThreadId.loadRelaxed();
}
@@ -952,7 +952,7 @@ int QThread::loopLevel() const
therefore give surprising results if it outlives the QThread object
(threads claimed to be the same even if they aren't).
*/
-Qt::HANDLE QThreadPrivate::threadId() const
+Qt::HANDLE QThreadPrivate::threadId() const noexcept
{
return data->threadId.loadRelaxed();
}
@@ -963,7 +963,7 @@ Qt::HANDLE QThreadPrivate::threadId() const
\sa currentThreadId()
*/
-bool QThread::isCurrentThread() const
+bool QThread::isCurrentThread() const noexcept
{
Q_D(const QThread);
return QThread::currentThreadId() == d->threadId();
@@ -1041,7 +1041,7 @@ QThread *QThread::currentThread()
return QThreadData::current()->thread.loadAcquire();
}
-bool QThread::isCurrentThread() const
+bool QThread::isCurrentThread() const noexcept
{
return true;
}