summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorMorten Sørvig <morten.sorvig@qt.io>2022-12-16 15:22:32 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2022-12-28 13:21:37 +0000
commitfbf2a318dd3f1e0f9fc8dadb68d47923dff3d672 (patch)
tree0e7047dcc1e93eeb959b5a8720220d274f47d925 /src/widgets
parent7b64eb71c0fe68540d97eb22492b4d0b0a647e9f (diff)
wasm: align QWasmLocalFileAccess API with 6.4
This API is undocumented, but by keeping unchanged makes it easier to use from external projects. openFile(): Copy the accept/filter list parsing function from 6.4. It makes sense to implement this behind the API, so that user code doesn't have to reimplement it. saveFile(): Slightly more complicated; the new variant which takes a QByteArray is better since the implementation can then keep a reference to the data for as long as it needs, without copying the data. Add the const char * variant to keep existing code going for now. Adjust the calling code in widgets. Pick-to: 6.5 Change-Id: I1899ebffdb90e40429dcb10313ccc5334f20c34f Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index e2f81c22a1..f3c28205fc 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -2296,7 +2296,7 @@ void QFileDialog::getOpenFileContent(const QString &nameFilter, const std::funct
openFileImpl.reset();
};
- QWasmLocalFileAccess::openFile(qt_make_filter_list(nameFilter), fileDialogClosed, acceptFile, fileContentReady);
+ QWasmLocalFileAccess::openFile(nameFilter.toStdString(), fileDialogClosed, acceptFile, fileContentReady);
};
(*openFileImpl)();