summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-08-19 16:27:57 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-08-24 13:39:06 +0200
commitbae9aeacbeb2d05aaec5e9dd7d1656ff929eb5db (patch)
tree06284952bcb78749ebeab4e7e8a5d949d66f65bd /cmake
parentf6b851837df08b3f2fc6a571a2cc4567471a2495 (diff)
macOS: Correctly compute marked and selected text range, and use for insertion
The NSTextInputClient protocol expects marked (composed) and selected text ranges to be relative to the document, not to the current editing block as Qt typically expects. Luckily we can use the absolute cursor position to compute an absolute offset that we can apply to any other positions, such as the selection. Now that we are computing the ranges correctly we can also use them during text insertion, when the incoming replacementRange is not valid. We then transform and sanitize the replacement range to the format that Qt expects for QInputMethodEvent::setCommitString(). Pick-to: 6.2 Change-Id: I4cb2f7c63adb92e407f38af05adce539c9bed7e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'cmake')
0 files changed, 0 insertions, 0 deletions