summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Buhr <andreas.buhr@qt.io>2022-02-15 14:17:12 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-16 20:10:13 +0000
commit378ef253c9c6b1d5ae0e98bf9fe982a5f6ff3659 (patch)
tree4aadec27d083df1c6d7831a5a418674528aa1b10 /tests
parentdbea2d693e389884ee7a914192682ef3c8c71307 (diff)
Repair tst_qabstractitemview in case of no cursor
tst_qabstractitemview requires a movable cursor. This patch skips the test if there is no movable cursor. Fixes: QTBUG-87400 Change-Id: I4e917b2ad062ce068f23603410aa9209edb9828d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 9beca767863739b4eccd642aeff296e2138032af) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST5
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp8
2 files changed, 7 insertions, 6 deletions
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST b/tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST
index 249c91c3c4..e69de29bb2 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST
+++ b/tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST
@@ -1,5 +0,0 @@
-[task200665_itemEntered]
-macos # Can't move cursor (QTBUG-76312)
-# QTBUG-87400
-[task200665_itemEntered]
-android
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
index 5c52439859..268268272d 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
@@ -1358,7 +1358,13 @@ void tst_QAbstractItemView::task200665_itemEntered()
{
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
QSKIP("Wayland: This fails. Figure out why.");
-
+ {
+ // skip if we can't move mouse
+ const QPoint cursorPos = QCursor::pos() + QPoint(10, 10);
+ QCursor::setPos(cursorPos);
+ if (!QTest::qWaitFor([cursorPos] { return QCursor::pos() == cursorPos; }, 500))
+ QSKIP("Can't move mouse");
+ }
//we test that view will emit entered
//when the scrollbar move but not the mouse itself
QStandardItemModel model(1000, 1);