summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_win.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2024-03-21 09:30:18 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2024-04-29 23:11:04 +0200
commit159ea47e2fc8ec7225db4feed3cb8926fbb93fc2 (patch)
tree28ec5320991c34bbe6c5ff0d6d55ae77a6f48529 /src/corelib/thread/qthread_win.cpp
parentde0f145022456db5f4242fe8689ef40bca7275e0 (diff)
QThread: Reuse isMainThread()
Internally, reuse threadId and theMainThreadId. Change-Id: Iea6e7d8fcbcaf7e2f4dbf8ab33890d0f7954edc0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r--src/corelib/thread/qthread_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 475a61bf65..a193595532 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -87,7 +87,7 @@ QThreadData *QThreadData::current(bool createIfNecessary)
threadData->isAdopted = true;
threadData->threadId.storeRelaxed(reinterpret_cast<Qt::HANDLE>(quintptr(GetCurrentThreadId())));
- if (!QCoreApplicationPrivate::theMainThread) {
+ if (!QCoreApplicationPrivate::theMainThreadId) {
QCoreApplicationPrivate::theMainThread = threadData->thread.loadRelaxed();
QCoreApplicationPrivate::theMainThreadId.storeRelaxed(threadData->threadId.loadRelaxed());
} else {