wasm: fix getOpenFileContent doc

The callback should be named the same as the function expects

Change-Id: I4ca73958313c93c0d68e7205d8641c4104247e0c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Lorn Potter 2019-10-31 12:26:00 +10:00
parent 93d261b965
commit 382f1a221b

View File

@ -146,13 +146,13 @@ dialog.exec();
//! [14] //! [14]
//! [15] //! [15]
auto fileOpenCompleted = [](const QString &fileName, const QByteArray &fileContent) { auto fileContentReady = [](const QString &fileName, const QByteArray &fileContent) {
if (fileName.isEmpty()) { if (fileName.isEmpty()) {
// No file was selected // No file was selected
} else { } else {
// Use fileName and fileContent // Use fileName and fileContent
} }
} };
QFileDialog::getOpenFileContent("Images (*.png *.xpm *.jpg)", fileContentReady); QFileDialog::getOpenFileContent("Images (*.png *.xpm *.jpg)", fileContentReady);
//! [15] //! [15]