diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-11-11 12:50:53 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-11-11 13:59:01 (GMT) |
commit | fe0f807e1f4e7510c6d8cddd848bcbc25e358651 (patch) | |
tree | 2311eaefceb27ff6285c1a74990d219fed582e34 /src/corelib/kernel | |
parent | 791c4035c28257e5a8426e6519866546faaf5286 (diff) | |
download | Qt-fe0f807e1f4e7510c6d8cddd848bcbc25e358651.zip Qt-fe0f807e1f4e7510c6d8cddd848bcbc25e358651.tar.gz Qt-fe0f807e1f4e7510c6d8cddd848bcbc25e358651.tar.bz2 |
Make sure posted events are always sent when calling processEvents() on Win32
After 31f1ff910, posted events could be delayed by a previous call to
processEvents(). This causes some tests to randomly fail, so bring back
the invariant that processEvents() will always call sendPostedEvents() when
called "manually" (i.e. not from exec()).
Reviewed-by: Prasanth Ullattil
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index 3050b82..0518e24 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -675,6 +675,11 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags) bool seenWM_QT_SENDPOSTEDEVENTS = false; bool needWM_QT_SENDPOSTEDEVENTS = false; do { + if (! (flags & QEventLoop::EventLoopExec)) { + // when called "manually", always send posted events + QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); + } + DWORD waitRet = 0; HANDLE pHandles[MAXIMUM_WAIT_OBJECTS - 1]; QVarLengthArray<MSG> processedTimers; |