Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
4.8.x, 5.3.2, 5.4.2, 5.5.1, 5.6.1, 5.7
-
tested Qt4.8.6 WinXP, Qt5.6.0 Windows7
Description
Reconversion feature on all Qt versions for windows has never worked so far.
Currently reconversion of Qt ime on windows has two problems.
Always all of user selected data get lost except the first character.
1. QTextBoundaryFinder always selects only one character for Ime characters, and neglects user selection.
2. QInputMethodEvent::Selection may give a bad visual impact to most of modern editors which support multi carets and multi occurences.
how to fix:
If selection, handle it as target. just return memsize.
If no selection, ask win ime of target range. Inform app to deletet the range. and return memsize.
Then the target range string starts normal WM_IME_COMPOSITION.
I patched it for Qt4.8.6 on WinXP and Qt5.6.0 on Windows7.
patch attached as plain source for a review.
from : :\Qt\4.8.6\src\gui\inputmethod\qwininpucontext_win.cpp
Sincerely a review would be appreciated.
Here follow demonstrations.
DEMO QTextEdit Qt4.8.6 WinXP
https://www.youtube.com/watch?v=ImEuDyLWlmQ
DEMO : Haven with scintillQt Qt4.8.6 WinXP
https://www.youtube.com/watch?v=KYKWmn3neLw
DEMO : Candidate Selection implemented by reconversion
https://youtu.be/0dJNhKyOK3A
DEMO : Reconversion Fixed for Qt5.6.0 on Windows7
https://youtu.be/vkt9qZeUIYU
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
On linux, Qt turns out to use QChar length for Qt::ImCursorPosition rather than character length:
https://bugreports.qt.io/browse/QTBUG-50826
reconversion for Korean IME:
https://bugreports.qt.io/browse/QTBUG-50451