summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmintegration.cpp
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2023-01-20 15:12:38 +0100
committerMikolaj Boc <mikolaj.boc@qt.io>2023-01-20 18:00:26 +0100
commit9b64bf0874b9e9323d6eadad2a8023c888f25182 (patch)
tree89bfd88836f6ba61c653dbe083612c1fb3ae636f /src/plugins/platforms/wasm/qwasmintegration.cpp
parentc290e742c6e780f0b507ea0f3ba287f2f6045572 (diff)
Handle the drop event in the wasm window element
Drop events are now handled in the wasm window element, which allows the browser to select the drop target automatically. This also fixes the case where drop data transfer finishes reading when a window has already been closed and destroyed - the cancellation flag is now owned by window so it gets invalidated as soon as window is gone. The code has also been structured with a new DragEvent passthrough. Fixes: QTBUG-109581 Change-Id: Ie3eb7446e2181fd540517f39397e8b35f111d009 Reviewed-by: MikoĊ‚aj Boc <Mikolaj.Boc@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmintegration.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmintegration.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp
index 090218a118e..b92e4566686 100644
--- a/src/plugins/platforms/wasm/qwasmintegration.cpp
+++ b/src/plugins/platforms/wasm/qwasmintegration.cpp
@@ -80,12 +80,6 @@ QWasmIntegration::QWasmIntegration()
m_clipboard(new QWasmClipboard),
m_accessibility(new QWasmAccessibility)
{
- // Temporary measure to make dropEvent appear in the library. EMSCRIPTEN_KEEPALIVE does not
- // work, nor does a Q_CONSTRUCTOR_FUNCTION in qwasmdrag.cpp.
- volatile bool foolEmcc = false;
- if (foolEmcc)
- dropEvent(emscripten::val::undefined());
-
s_instance = this;
touchPoints = emscripten::val::global("navigator")["maxTouchPoints"].as<int>();