summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-12-20 18:41:26 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-01-19 14:22:52 +0100
commitd671bab0e3fc61532bcfdb4ff3f7a468d2b14b6b (patch)
treed7d20a3de4e5bc232ad32a66d741a71eeb3d22f2 /tests
parentd292f0143f05439e70d0af6152befa0e32487226 (diff)
Win32: always allow the event loop to be woken up by posted events
We set the wakeUps atomic to prevent multiple WM_QT_SENDPOSTEDEVENTS from being posted. However, this might happen right after the event processing thread cleared the atomic, but before it processed the previous WM_QT_SENDPOSTEDEVENTS message. In that case, we end up with a set atomic and an empty event queue, resulting in the event loop to block even though there are posted QEvents. To prevent that, always reset the atomic when we handle the WM_QT_SENDPOSTEDEVENTS message. In that case, we either call sendPostedEvents, or startPostedEventsTimer. The former already resets wakeUps; reset it in the latter as well. Fixes: QTBUG-99323 Pick-to: 6.2 6.3 5.15 Change-Id: I931c02be9c42b02e8ca20daba5059cd8185f0a37 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
index aea1c7ec9b..a3732f2d95 100644
--- a/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
+++ b/tests/auto/corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp
@@ -397,9 +397,6 @@ void tst_QEventDispatcher::postEventFromThread()
}
done = true;
- if (QAbstractEventDispatcher::instance()->inherits("QEventDispatcherWin32"))
- QEXPECT_FAIL("", QAbstractEventDispatcher::instance()->metaObject()->className(), Continue);
-
QVERIFY(!hadToQuit);
QVERIFY(threadPool->waitForDone());
}