Morten Sørvig c28e68c729 wasm: implement async drag-and-drop
Make toMimeDataWithFile() handle writing files to the
in-memory file system correctly: this is an async operation
and we need to collect the files as the writes complete
and then invoke the callback once all files have been
saved. There's then no need for a global static QMimeData.

Use toMimeDataWithFile() for both the paste and drop
handling, however QPlatformClipboard::setMimeData() takes
ownership of the passed in QMimeData and the callback API
must be designed accordingly.

An open question is when we should delete the files.
Deleting them right away (after calling the app event
handler) is predictable, however it looks like QPlatformClipboard::setMimeData() retains the current
QMimeData until a new one is set, so maybe we should
follow that.

Change-Id: Ia9b825eaef1134ff9a554e51ee7e41d1c2ee779a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 0ffe8050bd5b55d64da37f5177a7e20dd9d14232)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-28 05:34:13 +00:00
2020-11-16 10:02:08 +02:00
2023-12-28 05:34:13 +00:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%