Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QThreadData Class Reference

#include <qthread_p.h>

+ Collaboration diagram for QThreadData:

Public Member Functions

 QThreadData (int initialRefCount=1)
 
 ~QThreadData ()
 
void ref ()
 
void deref ()
 
bool hasEventDispatcher () const
 
QAbstractEventDispatchercreateEventDispatcher ()
 
QAbstractEventDispatcherensureEventDispatcher ()
 
bool canWaitLocked ()
 

Static Public Member Functions

static Q_AUTOTEST_EXPORT QThreadDatacurrent (bool createIfNecessary=true)
 
static void clearCurrentThreadData ()
 
static QThreadDataget2 (QThread *thread)
 

Public Attributes

int loopLevel
 
int scopeLevel
 
QStack< QEventLoop * > eventLoops
 
QPostEventList postEventList
 
QAtomicPointer< QThreadthread
 
QAtomicPointer< voidthreadId
 
QAtomicPointer< QAbstractEventDispatchereventDispatcher
 
QList< void * > tls
 
bool quitNow
 
bool canWait
 
bool isAdopted
 
bool requiresCoreApplication
 

Detailed Description

Definition at line 283 of file qthread_p.h.

Constructor & Destructor Documentation

◆ QThreadData()

QThreadData::QThreadData ( int initialRefCount = 1)

Definition at line 48 of file qthread.cpp.

Referenced by current().

+ Here is the caller graph for this function:

◆ ~QThreadData()

QThreadData::~QThreadData ( )

Member Function Documentation

◆ canWaitLocked()

bool QThreadData::canWaitLocked ( )
inline

Definition at line 308 of file qthread_p.h.

References canWait, QPostEventList::mutex, and postEventList.

◆ clearCurrentThreadData()

void QThreadData::clearCurrentThreadData ( )
static

Definition at line 1103 of file qthread.cpp.

Referenced by ~QThreadData().

+ Here is the caller graph for this function:

◆ createEventDispatcher()

QAbstractEventDispatcher * QThreadData::createEventDispatcher ( )

Definition at line 113 of file qthread.cpp.

References QThreadPrivate::createEventDispatcher(), eventDispatcher, and QBasicAtomicPointer< X >::storeRelease().

Referenced by ensureEventDispatcher().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ current()

QThreadData * QThreadData::current ( bool createIfNecessary = true)
static

◆ deref()

void QThreadData::deref ( )

Definition at line 105 of file qthread.cpp.

References QBasicAtomicInteger< T >::deref().

Referenced by QObject::moveToThread(), QObjectPrivate::ConnectionData::removeConnection(), and QObjectPrivate::setThreadData_helper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ensureEventDispatcher()

QAbstractEventDispatcher * QThreadData::ensureEventDispatcher ( )
inline

Definition at line 300 of file qthread_p.h.

References createEventDispatcher(), eventDispatcher, QBasicAtomicPointer< X >::loadRelaxed(), and Q_LIKELY.

Referenced by QWindowsRemovableDriveListener::addPath().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get2()

static QThreadData * QThreadData::get2 ( QThread * thread)
inlinestatic

Definition at line 291 of file qthread_p.h.

References Q_ASSERT_X, and thread.

Referenced by QCoreApplicationData::~QCoreApplicationData(), QtWaylandClient::QWaylandWindow::createDecoration(), QtWaylandClient::QWaylandWindow::doApplyConfigure(), QAbstractEventDispatcher::instance(), QMetaMethodInvoker::invokeImpl(), QObject::moveToThread(), and QtWaylandClient::QWaylandWindow::setCanResize().

+ Here is the caller graph for this function:

◆ hasEventDispatcher()

bool QThreadData::hasEventDispatcher ( ) const
inline

Definition at line 297 of file qthread_p.h.

References eventDispatcher, and QBasicAtomicPointer< X >::loadRelaxed().

+ Here is the call graph for this function:

◆ ref()

void QThreadData::ref ( )

Definition at line 97 of file qthread.cpp.

References QBasicAtomicInteger< T >::loadRelaxed(), Q_ASSERT, QBasicAtomicInteger< T >::ref(), and void.

Referenced by QMetaObjectPrivate::connect(), QObjectPrivate::connectImpl(), and QObject::moveToThread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ canWait

bool QThreadData::canWait

Definition at line 329 of file qthread_p.h.

Referenced by canWaitLocked().

◆ eventDispatcher

QAtomicPointer<QAbstractEventDispatcher> QThreadData::eventDispatcher

Definition at line 325 of file qthread_p.h.

Referenced by createEventDispatcher(), ensureEventDispatcher(), and hasEventDispatcher().

◆ eventLoops

QStack<QEventLoop *> QThreadData::eventLoops

Definition at line 321 of file qthread_p.h.

Referenced by QCoreApplication::exec().

◆ isAdopted

bool QThreadData::isAdopted

Definition at line 330 of file qthread_p.h.

◆ loopLevel

int QThreadData::loopLevel

Definition at line 318 of file qthread_p.h.

◆ postEventList

◆ quitNow

bool QThreadData::quitNow

◆ requiresCoreApplication

bool QThreadData::requiresCoreApplication

Definition at line 331 of file qthread_p.h.

◆ scopeLevel

int QThreadData::scopeLevel

◆ thread

◆ threadId

QAtomicPointer<void> QThreadData::threadId

Definition at line 324 of file qthread_p.h.

Referenced by ~QThreadData(), and doActivate().

◆ tls

QList<void *> QThreadData::tls

Definition at line 326 of file qthread_p.h.


The documentation for this class was generated from the following files: