Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7.0
-
None
Description
When running the Location / Mapview example on WebAssembly target using a map accessible via https (which is required for WebAssembly), a large text message is overlaid over the map saying:
The active map type requires (missing) SSL support
Even though it works.
The problem seems to come from the following code in main.cpp:
#if QT_CONFIG(ssl) engine.rootContext()->setContextProperty("supportsSsl", QSslSocket::supportsSsl()); #else engine.rootContext()->setContextProperty("supportsSsl", false); #endif
QT_CONFIG(ssl) is not defined for WebAssembly target. However, the browser can still download via https.
Changing it to something like:
#if QT_CONFIG(ssl) engine.rootContext()->setContextProperty("supportsSsl", QSslSocket::supportsSsl()); #elif defined(__EMSCRIPTEN__) engine.rootContext()->setContextProperty("supportsSsl", true); #else engine.rootContext()->setContextProperty("supportsSsl", false); #endif
fixes it, although perhaps not ideal fix.
Note that to get Location to work on WebAssembly, you need to apply the fix in https://bugreports.qt.io/browse/QTBUG-125248