mirror of https://github.com/qt/qtbase.git
no-thread: add QThread::isMainThread() definition
In this configuration there is one thread (as far as Qt is
concerned), and that is the main thread.
Pick-to: 6.8
Change-Id: I6817961a0f95f2e8b1bb3ea120154d954f1eaf0f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
(cherry picked from commit 59039f42d8
)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
7affce8752
commit
f1136de666
|
@ -1010,6 +1010,11 @@ QThread *QThread::currentThread()
|
|||
return QThreadData::current()->thread.loadAcquire();
|
||||
}
|
||||
|
||||
bool QThread::isMainThread() noexcept
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QThread::isCurrentThread() const noexcept
|
||||
{
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue