summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
diff options
context:
space:
mode:
authorMorten Sørvig <morten.sorvig@qt.io>2023-06-28 14:16:45 +0200
committerMorten Sørvig <morten.sorvig@qt.io>2023-07-04 15:42:01 +0200
commit3f8f79ddafc68e2a3e1bdf59355e9a4958f46d12 (patch)
treedfec5c39bb07cba62ab4d5f9d2f1cf4c1235d842 /src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
parent8aa0d71d06fc1673d90bddecc15c8c7917a39c32 (diff)
wasm: introduce virtual processPostedEvents()
Don't re-use processEvents() for the case where we get a callback from the native event loop and want to send events. This makes it clearer that these are two different cases. Align with the Core Foundation event dispatcher where processPostedEvents() is virtual and is overridden by the Gui event dispatcher to send window system events. Pick-to: 6.6 Change-Id: I3ea9c55c1d9c03195c1937c4dcc0e5b689e15448 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmeventdispatcher.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmeventdispatcher.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
index 2fd1a30401..cd2cefc14d 100644
--- a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
+++ b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
@@ -8,10 +8,11 @@
QT_BEGIN_NAMESPACE
// Note: All event dispatcher functionality is implemented in QEventDispatcherWasm
-// in QtCore, except for processWindowSystemEvents() below which uses API from QtGui.
-void QWasmEventDispatcher::processWindowSystemEvents(QEventLoop::ProcessEventsFlags flags)
+// in QtCore, except for processPostedEvents() below which uses API from QtGui.
+bool QWasmEventDispatcher::processPostedEvents()
{
- QWindowSystemInterface::sendWindowSystemEvents(flags);
+ QEventDispatcherWasm::processPostedEvents();
+ return QWindowSystemInterface::sendWindowSystemEvents(QEventLoop::AllEvents);
}
QT_END_NAMESPACE