summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Sørvig <[email protected]>2024-01-03 15:14:19 +0100
committerMorten Johan Sørvig <[email protected]>2024-01-08 21:00:09 +0000
commit5b53f9b3f8e5f0b642e9e9c48cd7574f23e77233 (patch)
treef3b6aee5184fd3788410f58cb7d149e0d29169a4
parenta2294287ad3edd729f165280a71b8dd7a5345b1d (diff)
wasm: actually save dropped files to /qt/tmp
We were reporting the correct url, but saving to the root of the file system. Pick-to: 6.7 Change-Id: I3e1fd63efb77dd75ccf7a8f44a3211965fe11be8 Reviewed-by: Lorn Potter <[email protected]>
-rw-r--r--src/plugins/platforms/wasm/qwasmdom.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/qwasmdom.cpp b/src/plugins/platforms/wasm/qwasmdom.cpp
index 0045f43745c..da88c5b83ea 100644
--- a/src/plugins/platforms/wasm/qwasmdom.cpp
+++ b/src/plugins/platforms/wasm/qwasmdom.cpp
@@ -170,7 +170,7 @@ void DataTransfer::toMimeDataWithFile(std::function<void(QMimeData *)> callback)
QUrl fileUrl = QUrl::fromLocalFile(qtTmpDir.filePath(QString::fromStdString(webfile.name())));
mimeContext->fileUrls.append(fileUrl);
- QFile file(fileName);
+ QFile file(fileUrl.toLocalFile());
if (!file.open(QFile::WriteOnly)) {
qWarning() << "File was not opened";
mimeContext->deref();