Tor Arne Vestbø e72c7e6a6a macOS: Account for selection when computing input-method ranges
Text insertion from an input method such as Writing Tools can come in
without there being any marked (preedit) text. In this case, if there
is a selection, Qt's input-method protocol specifies that the receiver
should remove the entire selection before processing the range of the
input-method event. But we were not taking selection into account when
computing the range passed to QInputMethodEvent, resulting in inserting
the text at the wrong location.

We now consider both marked and selected text when sanitizing and
computing ranges. For now we assume that there can't be selected
text and marked text at the same time, and we also assume that the
incoming replacement range is not a subset of the selection range,
as this would mean we would need to extract parts of the selection
into the commit string up front.

Change-Id: I8948735a10265f92c01bc4e01870a7870fb1081f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit 500d19bb54c8fff58b169bb3c5a9aaaa5277151f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-01 08:42:53 +00:00
2024-02-29 15:35:57 +01:00
2024-07-12 01:42:29 +00:00
2024-09-19 07:20:47 +03:00
2024-02-02 15:23:02 +00:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%