From 867fee2c1589dc93a48fd8440fa188b246117ede Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 24 Feb 2022 17:50:54 -0800 Subject: [PATCH] Doc: QThread: clarify that start() always creates the event dispatcher Fixes: QTBUG-101283 Pick-to: 6.2 6.3 Change-Id: Ibf4acec0f166495998f7fffd16d6e4692be24409 Reviewed-by: Keith Kyzivat Reviewed-by: Thiago Macieira --- src/corelib/thread/qthread.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index edff18fcf5..c1610ac2c2 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -996,8 +996,11 @@ QAbstractEventDispatcher *QThread::eventDispatcher() const Sets the event dispatcher for the thread to \a eventDispatcher. This is only possible as long as there is no event dispatcher installed for the - thread yet. That is, before the thread has been started with start() or, in - case of the main thread, before QCoreApplication has been instantiated. + thread yet. + + An event dispatcher is automatically created for the main thread when \l + QCoreApplication is instantiated and on start() for auxiliary threads. + This method takes ownership of the object. */ void QThread::setEventDispatcher(QAbstractEventDispatcher *eventDispatcher)