aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2024-10-16 10:09:32 +0200
committerAxel Spoerl <axel.spoerl@qt.io>2024-11-01 15:37:36 +0000
commit629db8d98eeb546eb3a2fca13699fa2b94a73e70 (patch)
treee024f80f4f10e83f4db9ff1202960883ce30047d
parent998641d0ea8a188238e07fa93744d3de33b4f43b (diff)
Skip tst_QQuickTextEdit::mouseSelection() when the cursor doesn't move
The test function causes an accessibility popup on certain macOS versions. Skip it, if the cursor can't be moved. Remove blacklisting for macOS, but add for QNX. Fixes: QTBUG-129947 Change-Id: I63a1277fd097794bdcebffecb71fdba563bb51c5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit c9ed68c146e13ef0776165535367cd7977a19567) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--tests/auto/quick/qquicktextedit/BLACKLIST1
-rw-r--r--tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktextedit/BLACKLIST b/tests/auto/quick/qquicktextedit/BLACKLIST
index 60e5fe1882..39918b11de 100644
--- a/tests/auto/quick/qquicktextedit/BLACKLIST
+++ b/tests/auto/quick/qquicktextedit/BLACKLIST
@@ -1,5 +1,6 @@
[mouseSelection]
opensuse-leap
+qnx
# QTBUG-78846
[mouseSelectionMode]
diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
index 6b6bf07c90..83c705f89f 100644
--- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
@@ -2182,6 +2182,9 @@ void tst_qquicktextedit::mouseSelection()
// press-and-drag-and-release from x1 to x2
QPoint p1 = textEditObject->positionToRectangle(from).center().toPoint();
QPoint p2 = textEditObject->positionToRectangle(to).center().toPoint();
+ QCursor::setPos(p2);
+ if (QCursor::pos() != p2)
+ QSKIP("Can't move mouse");
if (clicks == 2)
QTest::mouseClick(&window, Qt::LeftButton, Qt::NoModifier, p1, moreThanDoubleClickInterval);
else if (clicks == 3)