Clarify behavior of QAbstractEventDispatcher::processEvents

The function, although implemented differently in each event dispatcher,
is not supposed to process newly posted events, only the events that
were queued at the time of the call.

This is tested by tst_QEventDispatcher::processEventsOnlySendsQueuedEvents,
which is not blacklisted on any platforms, so we know it's the behavior
in practice.

Change-Id: If9a874eeeb8ebcebe88ed119b065ae12fc545129
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tor Arne Vestbø 2018-09-07 10:50:07 +02:00
parent 3d8846b4b9
commit 25b8af0747

View File

@ -207,6 +207,15 @@ QAbstractEventDispatcher *QAbstractEventDispatcher::instance(QThread *thread)
\sa hasPendingEvents()
*/
/*!
\internal
\note processEvents() only processes events queued before the function
is called. Events that are posted while the function runs will be queued
until a later round of event processing. This only applies to posted Qt
events. For timers and system level events, the situation is unknown.
*/
/*! \fn bool QAbstractEventDispatcher::hasPendingEvents()
\deprecated