aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlplatform.cpp
diff options
context:
space:
mode:
authorFredrik Orderud <fredrik.orderud@ge.com>2020-04-20 19:47:30 +0200
committerFredrik Orderud <fredrik.orderud@ge.com>2020-04-21 09:41:58 +0200
commit6555642db7b3b992335f98dc01863db4beea3fd4 (patch)
tree3e48226cb7b92b3c954fc65869af69fe6a366ce6 /src/qml/qml/qqmlplatform.cpp
parentcdc6c2164a80311979a6c247d6fb77d436612e5f (diff)
WASM: Enable WebAssembly platform detection from QML
WebAssembly seem to be missing from the list of reported platform in QML. Adding it to the list enables writing of work-arounds for wasm-specific bugs like e.g. QTBUG-83380 also in QML code. Change-Id: Ifc5966ee0da0e62bfd8d4a029e1a42962686e43c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlplatform.cpp')
-rw-r--r--src/qml/qml/qqmlplatform.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlplatform.cpp b/src/qml/qml/qqmlplatform.cpp
index 0acf20bbb4..c1ad5c0886 100644
--- a/src/qml/qml/qqmlplatform.cpp
+++ b/src/qml/qml/qqmlplatform.cpp
@@ -76,6 +76,8 @@ QString QQmlPlatform::os()
return QStringLiteral("qnx");
#elif defined(Q_OS_UNIX)
return QStringLiteral("unix");
+#elif defined(Q_OS_WASM)
+ return QStringLiteral("wasm");
#else
return QStringLiteral("unknown");
#endif