From 7de701b1a3e23a51f558b5e7d6c8bbe9a9429865 Mon Sep 17 00:00:00 2001 From: Bartlomiej Moskal Date: Tue, 14 Jan 2025 13:39:23 +0100 Subject: [PATCH] Android: Unblacklist tst_QLineEdit selection tests Using the left/right keyboard key will deselect the text but also move the cursor. In this case, to be consistent with the test, the cursor must return to the previous position. This allows to unblacklist tests: - undo_keypressevents - leftKeyOnSelectedText Task-number: QTBUG-87417 Fixes: QTQAINFRA-6890 Fixes: QTQAINFRA-6895 Change-Id: I8a6d7cca332fe365ca820a67c23d9cd3fc36fc43 Reviewed-by: Assam Boudjelthia (cherry picked from commit 43f2fdc25cfd356292636ea1f8160cf62bab4018) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 4ae1b626efaac7b4ae7fba62aacd2838b21ca311) --- tests/auto/widgets/widgets/qlineedit/BLACKLIST | 4 ---- tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/auto/widgets/widgets/qlineedit/BLACKLIST b/tests/auto/widgets/widgets/qlineedit/BLACKLIST index a459495d1a9..57d56b56692 100644 --- a/tests/auto/widgets/widgets/qlineedit/BLACKLIST +++ b/tests/auto/widgets/widgets/qlineedit/BLACKLIST @@ -1,8 +1,4 @@ # QTBUG-87417 -[undo_keypressevents] -android -[leftKeyOnSelectedText] -android [textMargin] android [testQuickSelectionWithMouse] diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp index be5a103a599..33902a3c071 100644 --- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp @@ -4956,7 +4956,7 @@ void tst_QLineEdit::QTBUG59957_clearButtonLeftmostAction() bool tst_QLineEdit::unselectingWithLeftOrRightChangesCursorPosition() { -#if defined Q_OS_WIN || defined Q_OS_QNX || defined Q_OS_VXWORKS //Windows, QNX and VxWorks do not jump to the beginning of the selection +#if defined Q_OS_WIN || defined Q_OS_QNX || defined Q_OS_VXWORKS || defined Q_OS_ANDROID // Android, Windows, QNX and VxWorks do not jump to the beginning of the selection return true; #endif // Platforms minimal/offscreen also need left after unselecting with right