diff options
author | Pekka Vuorela <pekka.ta.vuorela@nokia.com> | 2012-02-23 15:57:14 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-01 20:13:51 +0200 |
commit | 6a4bf73c07b034a0f9d07cb617d23e92ca778dd1 (patch) | |
tree | 818497855c1ad073919c214fa52ba3fd5b50d7d7 /tests/auto/shared | |
parent | 1f5e058f79f95e869d8de300596137463492056c (diff) |
Added some convenience API for platform input contexts
QPlatformInputContext now gets notified on changed focus and
has inputMethodAccepted() telling whether current focus object
accepts input method events.
Also adapted IBus plugin to use this. Key event filtering for
focused objects without input method support got fixed by the
change.
Change-Id: I6910aa6af2459d752a5763f0ae88fa8c34e5b165
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Diffstat (limited to 'tests/auto/shared')
-rw-r--r-- | tests/auto/shared/platforminputcontext.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/shared/platforminputcontext.h b/tests/auto/shared/platforminputcontext.h index 2c1a3bcb25..2049ec7d61 100644 --- a/tests/auto/shared/platforminputcontext.h +++ b/tests/auto/shared/platforminputcontext.h @@ -55,7 +55,8 @@ public: m_lastQueries(Qt::ImhNone), m_action(QInputMethod::Click), m_cursorPosition(0), - m_lastEventType(QEvent::None) + m_lastEventType(QEvent::None), + m_setFocusObjectCallCount(0) {} virtual QRectF keyboardRect() const { return m_keyboardRect; } @@ -111,6 +112,11 @@ public: m_inputDirectionCallCount++; return Qt::LeftToRight; } + virtual void setFocusObject(QObject *object) + { + Q_UNUSED(object); + m_setFocusObjectCallCount++; + } bool m_animating; bool m_visible; @@ -125,4 +131,5 @@ public: int m_cursorPosition; int m_lastEventType; QRectF m_keyboardRect; + int m_setFocusObjectCallCount; }; |