Fix XPASS in tst_QLineEdit on VxWorks

On VxWorks, which uses clang as its sole compiler and ARM32 as one of
its platforms, check for partial selection of text on simulated mouse
move passes in tst_QLineEdit::testQuickSelectionWithMouse test function,
in line 5053.  This causes "QEXPECT_FAIL" preceding this check to fail
the test due to XPASS.

According to message in QEXPECT_FAIL, this ifdef is intended not only
for platforms based on ARM32, but also for gcc_arm7 target. Since
VxWorks for 32 bit ARM uses clang, it might be assumed that this is the
same for any other platform that uses clang as a compiler.
Unfortunately, due to unknow actual reason for this issue, I can't make
such general assumption, so to stay on a safe side, only VxWorks should
be excluded from ARM32 platforms using this "QEXPECT_FAIL".

Exclude VxWorks from platforms that expect failure in text selection
check in tst_QLineEdit::testQuickSelectionWithMouse test function.

Task-number: QTBUG-115777
Task-number: QTBUG-131362
Change-Id: Id10f0462e5416935c01a41f173c48c17803531c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
Michał Łoś 2024-11-19 09:24:26 +01:00
parent fc39077737
commit 3e1d5843f3

View File

@ -5049,7 +5049,7 @@ void tst_QLineEdit::testQuickSelectionWithMouse()
QVERIFY(lineEdit.selectedText().endsWith(suffix));
QTest::mouseMove(lineEdit.windowHandle(), center + QPoint(20, 0));
qCDebug(lcTests) << "Selected text:" << lineEdit.selectedText();
#ifdef Q_PROCESSOR_ARM_32
#ifdef Q_PROCESSOR_ARM_32 && !defined(Q_OS_VXWORKS)
QEXPECT_FAIL("", "Currently fails on gcc-armv7, needs investigation.", Continue);
#endif
QCOMPARE(lineEdit.selectedText(), partialSelection);