diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-19 17:18:19 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-22 08:45:16 +0000 |
commit | 9388bbe4bdc366760c0ee5953d5f2157c51a8e68 (patch) | |
tree | 37a6257846a1d2efacd61c4272c24c96f73ee276 /src/plugins/platforms/windows/qwindowsinputcontext.h | |
parent | e137676354dbc6f1d63e9d1ee1163a86623c948a (diff) |
Windows: Implement QPlatformInputContext::locale().
Initialize locale from current keyboard value and listen
to WM_INPUTLANGCHANGE.
Task-number: QTBUG-48772
Change-Id: I53b6ef4e2cf538bb81b41ea497ed0cb66991b104
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsinputcontext.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsinputcontext.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsinputcontext.h b/src/plugins/platforms/windows/qwindowsinputcontext.h index eb4e3a3faa..636d481e70 100644 --- a/src/plugins/platforms/windows/qwindowsinputcontext.h +++ b/src/plugins/platforms/windows/qwindowsinputcontext.h @@ -36,6 +36,7 @@ #include "qtwindows_additional.h" +#include <QtCore/QLocale> #include <QtCore/QPointer> #include <qpa/qplatforminputcontext.h> @@ -66,6 +67,8 @@ public: static void setWindowsImeEnabled(QWindowsWindow *platformWindow, bool enabled); bool hasCapability(Capability capability) const Q_DECL_OVERRIDE; + QLocale locale() const Q_DECL_OVERRIDE { return m_locale; } + void reset() Q_DECL_OVERRIDE; void update(Qt::InputMethodQueries) Q_DECL_OVERRIDE; void invokeAction(QInputMethod::Action, int cursorPosition) Q_DECL_OVERRIDE; @@ -79,6 +82,7 @@ public: int reconvertString(RECONVERTSTRING *reconv); bool handleIME_Request(WPARAM wparam, LPARAM lparam, LRESULT *result); + void handleInputLanguageChanged(WPARAM wparam, LPARAM lparam); private slots: void cursorRectChanged(); @@ -94,6 +98,8 @@ private: static HIMC m_defaultContext; CompositionContext m_compositionContext; bool m_endCompositionRecursionGuard; + LCID m_languageId; + QLocale m_locale; }; QT_END_NAMESPACE |