![]() |
Qt 6.x
The Qt SDK
|
#include <qthread_p.h>
Public Member Functions | |
QThreadData (int initialRefCount=1) | |
~QThreadData () | |
void | ref () |
void | deref () |
bool | hasEventDispatcher () const |
QAbstractEventDispatcher * | createEventDispatcher () |
QAbstractEventDispatcher * | ensureEventDispatcher () |
bool | canWaitLocked () |
Static Public Member Functions | |
static Q_AUTOTEST_EXPORT QThreadData * | current (bool createIfNecessary=true) |
static void | clearCurrentThreadData () |
static QThreadData * | get2 (QThread *thread) |
Public Attributes | |
int | loopLevel |
int | scopeLevel |
QStack< QEventLoop * > | eventLoops |
QPostEventList | postEventList |
QAtomicPointer< QThread > | thread |
QAtomicPointer< void > | threadId |
QAtomicPointer< QAbstractEventDispatcher > | eventDispatcher |
QList< void * > | tls |
bool | quitNow |
bool | canWait |
bool | isAdopted |
bool | requiresCoreApplication |
Definition at line 282 of file qthread_p.h.
QThreadData::QThreadData | ( | int | initialRefCount = 1 | ) |
Definition at line 48 of file qthread.cpp.
QThreadData::~QThreadData | ( | ) |
Definition at line 56 of file qthread.cpp.
References QList< T >::at(), clearCurrentThreadData(), QPostEvent::event, i, QBasicAtomicPointer< X >::loadAcquire(), QBasicAtomicInteger< T >::loadRelaxed(), postEventList, Q_ASSERT, QPostEvent::receiver, QList< T >::size(), QBasicAtomicPointer< X >::storeRelease(), QCoreApplicationPrivate::theMainThread, and thread.
|
inline |
Definition at line 307 of file qthread_p.h.
References canWait, QPostEventList::mutex, and postEventList.
|
static |
Definition at line 1019 of file qthread.cpp.
Referenced by ~QThreadData().
QAbstractEventDispatcher * QThreadData::createEventDispatcher | ( | ) |
Definition at line 112 of file qthread.cpp.
References QThreadPrivate::createEventDispatcher(), eventDispatcher, and QBasicAtomicPointer< X >::storeRelease().
Referenced by ensureEventDispatcher().
|
static |
Definition at line 1005 of file qthread.cpp.
References QBasicAtomicPointer< X >::storeRelease(), QCoreApplicationPrivate::theMainThread, and thread.
Referenced by QObject::QObject(), QWindowsRemovableDriveListener::addPath(), QCoreApplicationPrivate::createEventDispatcher(), QThread::currentThread(), QCoreApplication::exec(), QAbstractEventDispatcher::instance(), QCoreApplicationPrivate::lockThreadPostEventList(), QObject::moveToThread(), QCoreApplication::postEvent(), postEventSourcePrepare(), QCoreApplication::processEvents(), QCoreApplication::processEvents(), qGlobalPostedEventsCount(), QCoreApplicationPrivate::removePostedEvent(), QCoreApplication::sendPostedEvents(), and QCoreApplicationPrivate::threadRequiresCoreApplication().
void QThreadData::deref | ( | ) |
Definition at line 104 of file qthread.cpp.
References QBasicAtomicInteger< T >::deref().
Referenced by QObject::moveToThread(), and QObjectPrivate::setThreadData_helper().
|
inline |
Definition at line 299 of file qthread_p.h.
References createEventDispatcher(), eventDispatcher, QBasicAtomicPointer< X >::loadRelaxed(), and Q_LIKELY.
Referenced by QWindowsRemovableDriveListener::addPath().
|
inlinestatic |
Definition at line 290 of file qthread_p.h.
References Q_ASSERT_X, and thread.
Referenced by QCoreApplicationData::~QCoreApplicationData(), QtWaylandClient::QWaylandWindow::doApplyConfigure(), QAbstractEventDispatcher::instance(), QMetaMethodInvoker::invokeImpl(), QObject::moveToThread(), and QtWaylandClient::QWaylandWindow::setCanResize().
|
inline |
Definition at line 296 of file qthread_p.h.
References eventDispatcher, and QBasicAtomicPointer< X >::loadRelaxed().
Referenced by QObjectPrivate::setThreadData_helper().
void QThreadData::ref | ( | ) |
Definition at line 96 of file qthread.cpp.
References QBasicAtomicInteger< T >::loadRelaxed(), Q_ASSERT, QBasicAtomicInteger< T >::ref(), and void.
Referenced by QMetaObjectPrivate::connect(), QObjectPrivate::connectImpl(), QObject::moveToThread(), and QObjectPrivate::setThreadData_helper().
bool QThreadData::canWait |
Definition at line 328 of file qthread_p.h.
Referenced by canWaitLocked(), and QObjectPrivate::setThreadData_helper().
QAtomicPointer<QAbstractEventDispatcher> QThreadData::eventDispatcher |
Definition at line 324 of file qthread_p.h.
Referenced by createEventDispatcher(), ensureEventDispatcher(), hasEventDispatcher(), and QObjectPrivate::setThreadData_helper().
QStack<QEventLoop *> QThreadData::eventLoops |
Definition at line 320 of file qthread_p.h.
Referenced by QCoreApplication::exec().
bool QThreadData::isAdopted |
Definition at line 329 of file qthread_p.h.
int QThreadData::loopLevel |
Definition at line 317 of file qthread_p.h.
QPostEventList QThreadData::postEventList |
Definition at line 321 of file qthread_p.h.
Referenced by ~QThreadData(), canWaitLocked(), QCoreApplicationPrivate::lockThreadPostEventList(), QObject::moveToThread(), qGlobalPostedEventsCount(), and QObjectPrivate::setThreadData_helper().
bool QThreadData::quitNow |
Definition at line 327 of file qthread_p.h.
Referenced by QCoreApplication::exec(), and QCoreApplicationPrivate::execCleanup().
bool QThreadData::requiresCoreApplication |
Definition at line 330 of file qthread_p.h.
int QThreadData::scopeLevel |
Definition at line 318 of file qthread_p.h.
Referenced by QScopedScopeLevelCounter::QScopedScopeLevelCounter(), and QScopedScopeLevelCounter::~QScopedScopeLevelCounter().
QAtomicPointer<QThread> QThreadData::thread |
Definition at line 322 of file qthread_p.h.
Referenced by ~QThreadData(), check_parent_thread(), current(), QThread::currentThread(), get2(), and QObject::moveToThread().
QAtomicPointer<void> QThreadData::threadId |
Definition at line 323 of file qthread_p.h.
Referenced by doActivate(), QMetaMethodInvoker::invokeImpl(), and QtWaylandClient::QWaylandWindow::setCanResize().
Definition at line 325 of file qthread_p.h.