While a native dialog is open, the application message queue is
handled by the native event loop which is external to Qt. In this
case, QEventDispatcherWin32::processEvents() does not run and socket
notifiers will not be activated. So, this patch moves the notifier
activation code into the window procedure, which enables socket
event processing with native dialogs.
Task-number: QTBUG-49782
Task-number: QTBUG-48901
Change-Id: Icbdd96b2e80c50b73505f4fe74957575b83d6cf1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
If Qt is not running its own event loop (e.g. if Qt is a plugin running
in a non-Qt host application with its own event loop, a call to
sendPostedEvents() should process all events by default, and not depend
on the flags passed to the last call to processEvents()
We also modify sendPostedEvents() to call its base implementation instead
of directly calling QCoreApplication::sendPostedEvents(). (The behavior of
the base implementation is the same, so no behavior change there).
This also adds a test for QWindow event handling without Qts event loop is
running. This is a black box test, just to ensure that basic functionality
is working. It can be extended later.
Task-number: QTBUG-45956
Change-Id: I7d688c0c6dec5f133fb495f07526debdde5389af
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>