diff options
author | Morten Sørvig <[email protected]> | 2022-12-16 17:24:48 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <[email protected]> | 2023-01-02 02:17:17 +0000 |
commit | 665c99b6c2201b095b1740dd444c0cf1a76cf775 (patch) | |
tree | 2ac704c69ab0da2fd09cadb809e5594e09a63168 | |
parent | 9efeed01fd093f9db59be5ad60677d6cb8ceb931 (diff) |
wasm: support setting Emscripten configuration
Support passing Emscripten configuration options to
the QtLoader constructor using the "moduleConfig"
key.
Previously, it was possible to set Emscripten config options
on the global Module object. However, recent versions
if Qt has switched to using the MODULARIZE=1 build setting,
in which case there is no global object.
Fixes: QTBUG-107979
Change-Id: Ie99b772ddbb1d9f5464c868a43c821bae01519e0
Reviewed-by: Mikołaj Boc <[email protected]>
Reviewed-by: Lorn Potter <[email protected]>
(cherry picked from commit a594e95c9a2faef247a284983ef3ece277917d15)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
-rw-r--r-- | src/plugins/platforms/wasm/qtloader.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/wasm/qtloader.js b/src/plugins/platforms/wasm/qtloader.js index 75385e8111b..5fa5c288f39 100644 --- a/src/plugins/platforms/wasm/qtloader.js +++ b/src/plugins/platforms/wasm/qtloader.js @@ -40,6 +40,8 @@ // // Config keys // +// moduleConfig : {} +// Emscripten module configuration // containerElements : [container-element, ...] // One or more HTML elements. QtLoader will display loader elements // on these while loading the application, and replace the loader with a @@ -131,7 +133,7 @@ function _QtLoader(config) // The Emscripten module and module configuration object. The module // object is created in completeLoadEmscriptenModule(). self.module = undefined; - self.moduleConfig = {}; + self.moduleConfig = config.moduleConfig || {}; // Qt properties. These are propagated to the Emscripten module after // it has been created. |