![]() |
Qt 6.x
The Qt SDK
|
#include <qqmlthread_p.h>
Public Member Functions | |
QQmlThread () | |
virtual | ~QQmlThread () |
void | startup () |
void | shutdown () |
bool | isShutdown () const |
QMutex & | mutex () |
void | lock () |
void | unlock () |
void | wakeOne () |
void | wait () |
QThread * | thread () const |
bool | isThisThread () const |
template<typename Method , typename ... Args> | |
void | callMethodInThread (Method &&method, Args &&...args) |
template<typename Method , typename ... Args> | |
void | callMethodInMain (Method &&method, Args &&...args) |
template<typename Method , typename ... Args> | |
void | postMethodToThread (Method &&method, Args &&...args) |
template<typename Method , typename ... Args> | |
void | postMethodToMain (Method &&method, Args &&...args) |
void | waitForNextMessage () |
Friends | |
class | QQmlThreadPrivate |
Definition at line 29 of file qqmlthread_p.h.
QQmlThread::QQmlThread | ( | ) |
Definition at line 171 of file qqmlthread.cpp.
|
virtual |
Definition at line 176 of file qqmlthread.cpp.
void QQmlThread::callMethodInMain | ( | Method && | method, |
Args &&... | args | ||
) |
Definition at line 113 of file qqmlthread_p.h.
Referenced by QQmlTypeLoaderThread::initializeEngine(), and QQmlTypeLoaderThread::initializeEngine().
void QQmlThread::callMethodInThread | ( | Method && | method, |
Args &&... | args | ||
) |
Definition at line 120 of file qqmlthread_p.h.
Referenced by QQmlTypeLoaderThread::load(), QQmlTypeLoaderThread::loadWithCachedUnit(), and QQmlTypeLoaderThread::loadWithStaticData().
bool QQmlThread::isShutdown | ( | ) | const |
Definition at line 218 of file qqmlthread.cpp.
References QQmlThreadPrivate::m_shutdown.
bool QQmlThread::isThisThread | ( | ) | const |
Definition at line 248 of file qqmlthread.cpp.
References QThread::currentThreadId(), and QObjectPrivate::get().
Referenced by QQmlTypeLoaderThread::callCompleted(), QQmlTypeLoaderThread::callDownloadProgressChanged(), doInitializeEngine(), QQmlDataBlob::errors(), QQmlTypeLoader::getType(), and waitForNextMessage().
void QQmlThread::lock | ( | ) |
Definition at line 228 of file qqmlthread.cpp.
References QQmlThreadPrivate::lock().
Referenced by waitForNextMessage().
QMutex & QQmlThread::mutex | ( | ) |
Definition at line 223 of file qqmlthread.cpp.
References QQmlThreadPrivate::mutex().
void QQmlThread::postMethodToMain | ( | Method && | method, |
Args &&... | args | ||
) |
Definition at line 134 of file qqmlthread_p.h.
Referenced by QQmlTypeLoaderThread::callCompleted(), and QQmlTypeLoaderThread::callDownloadProgressChanged().
void QQmlThread::postMethodToThread | ( | Method && | method, |
Args &&... | args | ||
) |
Definition at line 127 of file qqmlthread_p.h.
Referenced by QQmlTypeLoaderThread::callCompleted(), QQmlTypeLoaderThread::callDownloadProgressChanged(), QQmlTypeLoaderThread::loadAsync(), QQmlTypeLoaderThread::loadWithCachedUnitAsync(), and QQmlTypeLoaderThread::loadWithStaticDataAsync().
void QQmlThread::shutdown | ( | ) |
Definition at line 191 of file qqmlthread.cpp.
References QCoreApplication::closingDown(), QFieldList< N, nextMember >::isEmpty(), QQmlThreadPrivate::lock(), QQmlThreadPrivate::m_shutdown, QQmlThreadPrivate::mainEvent(), QQmlThreadPrivate::mainList, QQmlThreadPrivate::mainSync, Q_ASSERT, QThread::quit(), QQmlThreadPrivate::threadList, QQmlThreadPrivate::triggerThreadEvent(), QQmlThreadPrivate::unlock(), and QQmlThreadPrivate::wait().
void QQmlThread::startup | ( | ) |
Starts the actual worker thread.
Definition at line 185 of file qqmlthread.cpp.
References QObject::moveToThread(), and QThread::start().
Referenced by QQmlTypeLoaderThread::QQmlTypeLoaderThread().
QThread * QQmlThread::thread | ( | ) | const |
Definition at line 253 of file qqmlthread.cpp.
void QQmlThread::unlock | ( | ) |
Definition at line 233 of file qqmlthread.cpp.
References QQmlThreadPrivate::unlock().
Referenced by waitForNextMessage().
void QQmlThread::wait | ( | ) |
Definition at line 243 of file qqmlthread.cpp.
References QQmlThreadPrivate::wait().
void QQmlThread::waitForNextMessage | ( | ) |
A call to this method will either:
Definition at line 376 of file qqmlthread.cpp.
References QFieldList< N, nextMember >::isEmpty(), isThisThread(), lock(), QQmlThreadPrivate::m_mainThreadWaiting, QQmlThreadPrivate::mainSync, Q_ASSERT, QQmlThreadPrivate::threadList, unlock(), QQmlThreadPrivate::wait(), and wakeOne().
Referenced by QQmlTypeLoader::getType().
void QQmlThread::wakeOne | ( | ) |
Definition at line 238 of file qqmlthread.cpp.
References QQmlThreadPrivate::wakeOne().
Referenced by waitForNextMessage().
|
friend |
Definition at line 69 of file qqmlthread_p.h.