be3b9b2ab1
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> |
||
---|---|---|
.. | ||
auto | ||
baseline | ||
benchmarks | ||
global | ||
libfuzzer | ||
manual | ||
shared | ||
testserver | ||
CMakeLists.txt | ||
README |
This directory contains autotests and benchmarks based on Qt Test. In order to run the autotests reliably, you need to configure a desktop to match the test environment that these tests are written for. Linux X11: * The user must be logged in to an active desktop; you can't run the autotests without a valid DISPLAY that allows X11 connections. * The tests are run against a KDE3 or KDE4 desktop. * Window manager uses "click to focus", and not "focus follows mouse". Many tests move the mouse cursor around and expect this to not affect focus and activation. * Disable "click to activate", i.e., when a window is opened, the window manager should automatically activate it (give it input focus) and not wait for the user to click the window.