summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmservices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmservices.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmservices.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/wasm/qwasmservices.cpp b/src/plugins/platforms/wasm/qwasmservices.cpp
index 9328b8c065..4eee3fe972 100644
--- a/src/plugins/platforms/wasm/qwasmservices.cpp
+++ b/src/plugins/platforms/wasm/qwasmservices.cpp
@@ -28,6 +28,8 @@
****************************************************************************/
#include "qwasmservices.h"
+#include "qwasmstring.h"
+
#include <QtCore/QUrl>
#include <QtCore/QDebug>
@@ -37,8 +39,8 @@ QT_BEGIN_NAMESPACE
bool QWasmServices::openUrl(const QUrl &url)
{
- QByteArray utf8Url = url.toString().toUtf8();
- emscripten::val::global("window").call<void>("open", emscripten::val(utf8Url.constData()), emscripten::val("_blank"));
+ emscripten::val jsUrl = QWasmString::fromQString(url.toString());
+ emscripten::val::global("window").call<void>("open", jsUrl, emscripten::val("_blank"));
return true;
}