diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2012-01-23 08:59:27 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-03 01:40:24 +0100 |
commit | b7ca6a81dbf6a2b96c8f04b856372050618e60c0 (patch) | |
tree | 58ae6adda02901ef8d035fc96734044a1f64fbcd /tests/auto/corelib | |
parent | da5d9e664f27abe41748f4360624c235c20e8c15 (diff) |
processEvents(WaitForMoreEvents) should return after delivering events
The Cocoa event dispatcher sends timer, socket, and posted events
correctly, but they are not NSEvents, and as such, they do not cause
[NSApp nextEventMatchingMask] to return. When calling processEvents()
with WaitForMoreEvents, but the EventLoopExec flag isn't set, we want to
interrupt the WaitForMoreEvents.
As a result, We should not call wakeUp() at the top of processEvents(),
otherwise we end up shortcutting other event sources. We also do not
need to call QCoreApplication::sendPostedEvents() directly either in
processEvents(), it's the postedEventsSource job to do that.
The interruptLater mechanism is always run when calling processEvents()
directly (not via exec()), which causes problems when testing
processEvents(). Don't use interruptLater unless the modal sessions
change (which is indicated by the cached session pointer being reset
to zero).
Change-Id: Iec2b49a4f306b2702c979522f12a28d0b5fbd0b4
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
Diffstat (limited to 'tests/auto/corelib')
0 files changed, 0 insertions, 0 deletions