aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredrik Orderud <fredrik.orderud@ge.com>2020-04-21 23:46:46 +0200
committerFredrik Orderud <fredrik.orderud@ge.com>2020-04-22 16:06:30 +0200
commit7513e896726f0dfc6e290b638c83ae45e4deb88a (patch)
tree725d4816548b5ad7764395f05cda2f75fd99dfa2
parent6555642db7b3b992335f98dc01863db4beea3fd4 (diff)
WASM: Fix broken WebAssembly platform detection
The existing check did unfortunately not work, since Q_OS_UNIX is also defined in addition to Q_OS_WASM when building for WASM. The Q_OS_WASM check must therefore be done _before_ the Q_OS_UNIX check. Sorry for not testing this properly before submitting my previous patch. Change-Id: Ic0b75be626fa6c826dd2d4672a915c282ee03807 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
-rw-r--r--src/qml/qml/qqmlplatform.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlplatform.cpp b/src/qml/qml/qqmlplatform.cpp
index c1ad5c0886..dcd7ca2d46 100644
--- a/src/qml/qml/qqmlplatform.cpp
+++ b/src/qml/qml/qqmlplatform.cpp
@@ -74,10 +74,10 @@ QString QQmlPlatform::os()
return QStringLiteral("linux");
#elif defined(Q_OS_QNX)
return QStringLiteral("qnx");
-#elif defined(Q_OS_UNIX)
- return QStringLiteral("unix");
#elif defined(Q_OS_WASM)
return QStringLiteral("wasm");
+#elif defined(Q_OS_UNIX)
+ return QStringLiteral("unix");
#else
return QStringLiteral("unknown");
#endif