summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmintegration.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2019-03-15 15:04:59 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2019-03-26 10:26:51 +0000
commitf4ac50a8389597827fd7fb952617b78aa4b113c2 (patch)
tree7d4a0e8aa4a1a956ed9e601893fe529be7d44056 /src/plugins/platforms/wasm/qwasmintegration.cpp
parent8f1acd29e4d39383752899d6d05d484eb9d7935b (diff)
wasm: Use common “qt” prefix for exported functions
Prevent namespace collisions and make sure Qt functions are grouped together. Change-Id: I217188ee93e4300e273d10a79d6014179fc5a1ef Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmintegration.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmintegration.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp
index 486f4cb2b3..3b4800a787 100644
--- a/src/plugins/platforms/wasm/qwasmintegration.cpp
+++ b/src/plugins/platforms/wasm/qwasmintegration.cpp
@@ -56,14 +56,14 @@
using namespace emscripten;
QT_BEGIN_NAMESPACE
-void browserBeforeUnload(emscripten::val)
+static void browserBeforeUnload(emscripten::val)
{
QWasmIntegration::QWasmBrowserExit();
}
-EMSCRIPTEN_BINDINGS(my_module)
+EMSCRIPTEN_BINDINGS(qtQWasmIntegraton)
{
- function("browserBeforeUnload", &browserBeforeUnload);
+ function("qtBrowserBeforeUnload", &browserBeforeUnload);
}
QWasmIntegration *QWasmIntegration::s_instance;
@@ -92,7 +92,7 @@ QWasmIntegration::QWasmIntegration()
addScreen(canvasId);
}
- emscripten::val::global("window").set("onbeforeunload", val::module_property("browserBeforeUnload"));
+ emscripten::val::global("window").set("onbeforeunload", val::module_property("qtBrowserBeforeUnload"));
}
QWasmIntegration::~QWasmIntegration()