summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-08-31 13:39:48 +0200
committerLars Knoll <lars.knoll@qt.io>2020-09-06 00:17:12 +0200
commit75d1d2a91376c3338510cf1e5fa10feaf8df5785 (patch)
treed75b6d14ea3f9bb72b10c71c64b21fdb00f9fc13 /src/plugins/platforms/wasm
parent2caa2faf01d66904b912fe1b1b443b5932d928d0 (diff)
Get rid of hasPendingEvents() and flush()
They are unused. Change-Id: I77383f2be45551401ed9c2f88285511134cc8b0d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm')
-rw-r--r--src/plugins/platforms/wasm/qwasmeventdispatcher.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
index 2e1b083557..1902f8a4a7 100644
--- a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
+++ b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
@@ -30,6 +30,7 @@
#include "qwasmeventdispatcher.h"
#include <QtCore/qcoreapplication.h>
+#include <QtGui/qpa/qwindowsysteminterface.h>
#include <emscripten.h>
@@ -144,7 +145,8 @@ void QWasmEventDispatcher::doMaintainTimers()
// native timer.
// Schedule a zero-timer to continue processing any pending events.
- if (!m_hasZeroTimer && hasPendingEvents()) {
+ extern uint qGlobalPostedEventsCount(); // from qapplication.cpp
+ if (!m_hasZeroTimer && (qGlobalPostedEventsCount() || QWindowSystemInterface::windowSystemEventsQueued())) {
auto callback = [](void *eventDispatcher) {
QWasmEventDispatcher *that = static_cast<QWasmEventDispatcher *>(eventDispatcher);
that->m_hasZeroTimer = false;