diff options
author | Paul Olav Tvete <paul.tvete@digia.com> | 2014-02-21 09:58:32 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-18 09:59:20 +0100 |
commit | 68a9229a97d358639357f76cfb186bb61aa6ce92 (patch) | |
tree | 62e72015ffed78821d7f1a8b6d7124594867dbff /src/plugins/platforms/android/qandroidinputcontext.h | |
parent | b55e0ac57f95b79879bcd301ff3b7365d957acc2 (diff) |
Android input method improvements
Use the new inputmethod query API. and get rid of the hack where
we would move the cursor back and forwards to make sure that the
Android software keyboard noticed that the cursor had moved.
The android plugin now uses absolute positions instead of
position within the paragraph for all cursor handling (provided
that the control supports the new API).
Task-number: QTBUG-37511
Change-Id: I03463dbbcb4acbfa41e2eab06889d021d50da01f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/plugins/platforms/android/qandroidinputcontext.h')
-rw-r--r-- | src/plugins/platforms/android/qandroidinputcontext.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/qandroidinputcontext.h b/src/plugins/platforms/android/qandroidinputcontext.h index 041bd0dc49..2fb54a97c4 100644 --- a/src/plugins/platforms/android/qandroidinputcontext.h +++ b/src/plugins/platforms/android/qandroidinputcontext.h @@ -114,14 +114,19 @@ public: jboolean copyURL(); jboolean paste(); +public slots: + void updateCursorPosition(); + private: QSharedPointer<QInputMethodQueryEvent> focusObjectInputMethodQuery(Qt::InputMethodQueries queries = Qt::ImQueryAll); void sendInputMethodEvent(QInputMethodEvent *event); + Q_INVOKABLE QVariant queryFocusObjectUnsafe(Qt::InputMethodQuery query, QVariant argument); + QVariant queryFocusObjectThreadSafe(Qt::InputMethodQuery query, QVariant argument); + private slots: virtual void sendEvent(QObject *receiver, QInputMethodEvent *event); virtual void sendEvent(QObject *receiver, QInputMethodQueryEvent *event); - void updateCursorPosition(); private: ExtractedText m_extractedText; |