diff options
author | Inho Lee <[email protected]> | 2023-09-28 13:42:57 +0200 |
---|---|---|
committer | Inho Lee <[email protected]> | 2024-07-05 06:54:26 +0200 |
commit | c844a7a5429e74d7cefb9774f288dbaa76fc2bbb (patch) | |
tree | bd69ed99324654cd46bec7fe12a471de11f8ba49 /src/plugins/platforms/wasm/qwasmintegration.h | |
parent | 385c9397712b771e0f2c3f0a6322f0f624f09a8a (diff) |
wasm: Revamp QWasmInputContext
1. Use QWasmInputContext by default
2. Use QInputMethodEvent instead of KeyEvent
Todo:
1. Platform dependent preedit control
especially when cursor moved with preedit.
(Tested on Android, Linux, Windows)
(Firefox still has a problem but it's not clear
why PointerEvent doesn't happen.)
2. Apply existing text to inputMethodQueries.
3. Test on touchscreen devices.
4. Test on IOS devices.
5. When dragging selection, freezing
6. Support context menu
Fixes: QTBUG-107139
Fixes: QTBUG-124932
Fixes: QTBUG-117096
Pick-to: 6.7 6.8
Change-Id: Iceb6af3489b3d1195ad58cf8f3deb91275fd1bf4
Reviewed-by: Lorn Potter <[email protected]>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmintegration.h')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmintegration.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/wasm/qwasmintegration.h b/src/plugins/platforms/wasm/qwasmintegration.h index 870bd0d16b4..99ccf333fb2 100644 --- a/src/plugins/platforms/wasm/qwasmintegration.h +++ b/src/plugins/platforms/wasm/qwasmintegration.h @@ -61,13 +61,13 @@ public: #endif void initialize() override; QPlatformInputContext *inputContext() const override; + QWasmInputContext *wasmInputContext() const { return m_wasmInputContext; } #if QT_CONFIG(draganddrop) QPlatformDrag *drag() const override; #endif QWasmClipboard *getWasmClipboard() { return m_clipboard; } - QWasmInputContext *getWasmInputContext() { return m_platformInputContext; } static QWasmIntegration *get() { return s_instance; } void setContainerElements(emscripten::val elementArray); @@ -100,7 +100,7 @@ private: mutable QScopedPointer<QPlatformInputContext> m_inputContext; static QWasmIntegration *s_instance; - mutable QWasmInputContext *m_platformInputContext = nullptr; + QWasmInputContext *m_wasmInputContext = nullptr; #if QT_CONFIG(draganddrop) std::unique_ptr<QWasmDrag> m_drag; |