diff options
author | Mikolaj Boc <mikolaj.boc@qt.io> | 2022-12-22 15:31:48 +0100 |
---|---|---|
committer | Mikolaj Boc <mikolaj.boc@qt.io> | 2023-01-18 02:55:12 +0100 |
commit | 16bf899557febb8c0762e64ce88acf21bc84e334 (patch) | |
tree | 2f0598c71edc24e01dbb156754a8943254ff9b9a /src/plugins/platforms/wasm/qwasmdom.h | |
parent | 2e8b75477fdbee53e0cf1266340a8dea6c1718a0 (diff) |
Streamline reading of js DataTransfer object
qwasmclipboard.cpp and qwasmdrag.cpp had the same logic that read
the js DataTransfer object implemented twice with small differences.
Use a single implementation in both.
This also introduces a clearer memory ownership model in the reader
code, and fixes a potential race condition by introducing a cancellation
flag.
Removed the useless QWasmDrag type which was in essence a SimpleDrag
and made the m_drag in QWasmIntegration a smart pointer.
Fixes: QTBUG-109626
Pick-to: 6.5
Change-Id: I5b76dd3b70ab2e5a8364d9a136c970ee8d4fae9c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmdom.h')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmdom.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmdom.h b/src/plugins/platforms/wasm/qwasmdom.h index 92f710a13d..80661fce19 100644 --- a/src/plugins/platforms/wasm/qwasmdom.h +++ b/src/plugins/platforms/wasm/qwasmdom.h @@ -8,6 +8,8 @@ #include <emscripten/val.h> +#include <functional> +#include <memory> #include <string> QT_BEGIN_NAMESPACE |