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 <lorn.potter@gmail.com>
This commit is contained in:
Morten Sørvig 2024-01-03 15:14:19 +01:00 committed by Morten Johan Sørvig
parent a2294287ad
commit 5b53f9b3f8

View File

@ -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();