QQmlThread: add some internal documentation

Change-Id: Ibd7c1236e88681965088d40dd3cc7f80e09e49b6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Fabian Kosmale 2022-09-16 12:35:51 +02:00
parent e5fe1e93c7
commit fe7249afb8
1 changed files with 21 additions and 0 deletions

View File

@ -191,6 +191,10 @@ QQmlThread::~QQmlThread()
delete d;
}
/*!
\internal
Starts the actual worker thread.
*/
void QQmlThread::startup()
{
d->lock();
@ -304,6 +308,13 @@ void QQmlThread::internalCallMethodInThread(Message *message)
d->unlock();
}
/*!
\internal
\note This method needs to run in the worker/QQmlThread
This runs \a message in the main thread, and blocks the
worker thread until the call has completed
*/
void QQmlThread::internalCallMethodInMain(Message *message)
{
#if !QT_CONFIG(thread)
@ -367,6 +378,16 @@ void QQmlThread::internalPostMethodToMain(Message *message)
d->unlock();
}
/*!
\internal
\note This method must be called in the main thread
A call to this method will either:
- run a message requested to run synchronously on the main thread if there is one
(and return afterrwards),
- wait for the worker thread to notify it if the worker thread has pending work,
- or simply return if neither of the conditions above hold
*/
void QQmlThread::waitForNextMessage()
{
#if QT_CONFIG(thread)