qt5base-lts/tests/auto
Axel Spoerl be3b9b2ab1 QAndroidPlatformInputContext: send composition text and cursor jointly
QAndroidPlatformInputContext::focusObjectStopComposing() sends an input
event for each character newly added by the Android virtual keyboard.
It then sends a second input event to notify that the cursor has
advanced to the position after the new character.
The implicit assumption is, that the receiver of the input event does
not change the text.

If e.g. QLineEdit::setText() is called in the QLineEdit::textEdited
slot, the text does change. If the change implies a cursor change,
QLineEdit notifies the platform input context about it.
However, by sending the second input event, QAndroidPlatformContent
returns the cursor back to the position after the last character added
by the virtual keyboard.

This patch joins the composed text and the cursor position into one
single input method event. A new cursor position, set by the receiver
of the input method event, is no longer overridden.
The patch adds test functionality to tst_QLineEdit::setText().

Fixes: QTBUG-115756
Pick-to: 6.6 6.5 6.2
Change-Id: I85ffac5d6bab93ccb144be0f5b8083258a270550
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-08-14 16:24:45 +02:00
..
bic/data Add binary compatibility file built against 6.5.0 2023-04-19 15:40:36 +00:00
cmake CMake: Place resources into static libraries, not object libraries 2023-08-14 14:05:32 +02:00
concurrent CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
corelib CI: Enable tests under corelib/serialization for Wasm platform 2023-08-14 16:08:32 +02:00
dbus dbus test headers: port away from Q_FOREACH 2023-08-13 09:19:22 +03:00
gui QEventDispatcher: test with glib disabled too 2023-08-11 16:45:40 +03:00
guiapplauncher Move Weather Anchor Layout example to manual tests 2023-03-02 05:55:57 +01:00
network tst_QSctpSocket: replace QList with const array 2023-08-08 16:03:28 +02:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other tst_QAccessibilityLinux: port away from Q_FOREACH 2023-08-09 23:57:21 +02:00
printsupport Android: temporarily skip tst_qprinterinfo, tst_qwidget and tst_qwindow 2023-07-26 20:12:49 +03:00
shared tests: remove PlatformInputContext::filterEvent() 2023-01-18 13:21:06 +01:00
sql tst_qvfssql: Don't use appless main 2023-08-11 15:45:36 +02:00
testlib Correct some testlib selftest data: blacklisted does not qFatal() 2023-07-31 18:16:05 +02:00
tools tst_rcc: port away from Q_FOREACH 2023-08-08 22:03:05 +02:00
wasm CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
widgets QAndroidPlatformInputContext: send composition text and cursor jointly 2023-08-14 16:24:45 +02:00
xml CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt CI: Enable tests under corelib/serialization for Wasm platform 2023-08-14 16:08:32 +02:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00