diff options
author | Janne Myöhänen <janne.myohanen@code-q.fi> | 2020-06-16 12:01:58 +0300 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-06-23 08:56:20 +0000 |
commit | 33c358e5766b488b866381a4195d178c1e5be655 (patch) | |
tree | a1eadafbd6861dedf53bb1f698ca8890369c937c /src/plugins/openwnn/plugin/openwnninputmethod.cpp | |
parent | 1d4f747311bce953c527969cb8f2016ffd21209b (diff) |
Fix cursor position in Japanese input
Fix cursor position in Japanese input when suggestion is selected.
The selected text is set as preedit text just before committing.
Fixes: QTBUG-74664
Change-Id: I7d1dd35fad8b844f5849c3006145c69792ce8725
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 5760593c66928c77b193a8502b8433e122980bc1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/plugins/openwnn/plugin/openwnninputmethod.cpp')
-rw-r--r-- | src/plugins/openwnn/plugin/openwnninputmethod.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/openwnn/plugin/openwnninputmethod.cpp b/src/plugins/openwnn/plugin/openwnninputmethod.cpp index d6206732..efe68a1e 100644 --- a/src/plugins/openwnn/plugin/openwnninputmethod.cpp +++ b/src/plugins/openwnn/plugin/openwnninputmethod.cpp @@ -805,6 +805,8 @@ void OpenWnnInputMethod::selectionListItemSelected(QVirtualKeyboardSelectionList { Q_UNUSED(type) Q_D(OpenWnnInputMethod); + // Set selected text as preeditText to place cursor at the end of selected text + inputContext()->setPreeditText(d->candidateList.at(index)->candidate); d->commitText(*d->candidateList.at(index)); } |