qt5base-lts/tests/auto/widgets
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
..
dialogs tst_QWizard: port away from Q_FOREACH[5/5]: CombinationsTestData ctor 2023-08-07 21:56:10 +00:00
effects CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
graphicsview tests: blacklist tst_QGraphicsItem::itemUsesExtendedStyleOption() on Wayland 2023-07-18 08:25:41 +02:00
itemviews QAbstractScrollArea: Don't include size of invisible scrollbars 2023-07-11 01:34:19 +02:00
kernel Add QEXPECT_FAIL to tst_QApplication::sendEventsOnProcessEvents 2023-08-10 16:42:51 +03:00
styles CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
util CMake: Make widgets 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
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00