summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/corelib/platform/wasm/qstdweb.cpp2
-rw-r--r--src/plugins/platforms/wasm/qwasmscreen.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/platform/wasm/qstdweb.cpp b/src/corelib/platform/wasm/qstdweb.cpp
index a915c031fe..cd3750ff73 100644
--- a/src/corelib/platform/wasm/qstdweb.cpp
+++ b/src/corelib/platform/wasm/qstdweb.cpp
@@ -225,7 +225,7 @@ Uint8Array::Uint8Array(const ArrayBuffer &buffer, uint32_t offset, uint32_t leng
// Constructs a Uint8Array which references an area on the heap.
Uint8Array::Uint8Array(const char *buffer, uint32_t size)
-:m_uint8Array(Uint8Array::constructor_().new_(Uint8Array::heap().buffer().m_arrayBuffer, uint32_t(buffer), size))
+:m_uint8Array(Uint8Array::constructor_().new_(Uint8Array::heap().buffer().m_arrayBuffer, uintptr_t(buffer), size))
{
}
diff --git a/src/plugins/platforms/wasm/qwasmscreen.cpp b/src/plugins/platforms/wasm/qwasmscreen.cpp
index 9ce2996fd4..4c67e3c799 100644
--- a/src/plugins/platforms/wasm/qwasmscreen.cpp
+++ b/src/plugins/platforms/wasm/qwasmscreen.cpp
@@ -44,7 +44,7 @@ QWasmScreen::QWasmScreen(const emscripten::val &containerOrCanvas)
// Create the canvas (for the correct document) as a child of the container
m_canvas = containerOrCanvas["ownerDocument"].call<emscripten::val>("createElement", std::string("canvas"));
containerOrCanvas.call<void>("appendChild", m_canvas);
- std::string screenId = std::string("qtcanvas_") + std::to_string(uint32_t(this));
+ std::string screenId = std::string("qtcanvas_") + std::to_string(uintptr_t(this));
m_canvas.set("id", screenId);
// Make the canvas occupy 100% of parent
@@ -168,7 +168,7 @@ std::string QWasmScreen::canvasSpecialHtmlTargetId() const
{
// Return a globally unique id for the canvas. We can choose any string,
// as long as it starts with a "!".
- return std::string("!qtcanvas_") + std::to_string(uint32_t(this));
+ return std::string("!qtcanvas_") + std::to_string(uintptr_t(this));
}
namespace {