summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmintegration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmintegration.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmintegration.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp
index 2e231cc5ce..18b5f06f35 100644
--- a/src/plugins/platforms/wasm/qwasmintegration.cpp
+++ b/src/plugins/platforms/wasm/qwasmintegration.cpp
@@ -84,22 +84,6 @@ QWasmIntegration::QWasmIntegration()
s_instance = this;
touchPoints = emscripten::val::global("navigator")["maxTouchPoints"].as<int>();
- // The Platform Detect: expand coverage as needed
- platform = GenericPlatform;
- emscripten::val rawPlatform = emscripten::val::global("navigator")["platform"];
-
- if (rawPlatform.call<bool>("includes", emscripten::val("Mac")))
- platform = MacOSPlatform;
- if (rawPlatform.call<bool>("includes", emscripten::val("iPhone")))
- platform = iPhonePlatform;
- if (rawPlatform.call<bool>("includes", emscripten::val("Win32")))
- platform = WindowsPlatform;
- if (rawPlatform.call<bool>("includes", emscripten::val("Linux"))) {
- platform = LinuxPlatform;
- emscripten::val uAgent = emscripten::val::global("navigator")["userAgent"];
- if (uAgent.call<bool>("includes", emscripten::val("Android")))
- platform = AndroidPlatform;
- }
// Create screens for container elements. Each container element can be a div element (preferred),
// or a canvas element (legacy). Qt versions prior to 6.x read the "qtCanvasElements" module property,
@@ -225,7 +209,7 @@ QPlatformOpenGLContext *QWasmIntegration::createPlatformOpenGLContext(QOpenGLCon
void QWasmIntegration::initialize()
{
- if (touchPoints < 1) // only touchscreen need inputcontexts
+ if (qgetenv("QT_IM_MODULE").isEmpty() && touchPoints < 1)
return;
QString icStr = QPlatformInputContextFactory::requested();