diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-07-25 15:49:36 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@digia.com> | 2014-08-08 00:25:55 +0200 |
commit | 29e2497a2c3d09470ad779dd1aadcefac2d4daaf (patch) | |
tree | ee33264d5ade53ff5832254004b6840ccef61f49 /src | |
parent | ce5dff18b9a61707617080be7be0cd688996ad6f (diff) |
TextInput::displayText: include partial input from an input method
[ChangeLog][QtQuick][Important Behavior Changes] TextInput::displayText
now includes also partial input from an input method and thus matches with
the actual displayed text.
Task-number: QTBUG-40329
Change-Id: I407f464938c550d73eba1351283ec751aa293380
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquicktextinput.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index 37b103613d..37e94cddc0 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -2303,12 +2303,15 @@ void QQuickTextInput::resetPasswordMaskDelay() this property holds the text visible to the user, while the \l text property holds the actual entered text. + \note Unlike the TextInput::text property, this contains + partial text input from an input method. + \readonly */ QString QQuickTextInput::displayText() const { Q_D(const QQuickTextInput); - return d->m_textLayout.text(); + return d->m_textLayout.text().insert(d->m_textLayout.preeditAreaPosition(), d->m_textLayout.preeditAreaText()); } /*! |