aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickdrawer
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2021-07-06 15:09:07 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2021-07-07 22:35:46 +0200
commit0ee5976cf25b9da0502368370b07d96914349ca0 (patch)
treedcffbc1abe220b2123aa72fa887aa8281c3f92fd /tests/auto/qquickdrawer
parent48da34f3d797f58b3eda9ed0a98aa1776d75d946 (diff)
tst_qquickdrawer: parent should not be hovered when child is hovered
There are two ways of working with hover events in Quick; Either by using pointer handlers (typically from QML), or by using hover events (typically from c++). The former will currently always propagate hover events up the parent chain, while the latter will block propagation by default, unless the event handler rejects the event. Since the test in this patch is testing hover events, and not hover handlers, we should expect the parent (drawerItem) to not be hovered when the child (drawerButton) is hovered. Pick-to: 6.2 Change-Id: Ia8fb8a29f7cefe07d4ec86db016e51f8d71ecb06 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/qquickdrawer')
-rw-r--r--tests/auto/qquickdrawer/tst_qquickdrawer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
index 57393d7a..2c7ec045 100644
--- a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
+++ b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
@@ -583,7 +583,7 @@ void tst_QQuickDrawer::hover()
QTest::mouseMove(window, QPoint(2, 2));
QVERIFY(!backgroundButton->isHovered());
QVERIFY(drawerButton->isHovered());
- QVERIFY(drawerItem->isHovered());
+ QVERIFY(!drawerItem->isHovered());
QSignalSpy closedSpy(drawer, SIGNAL(closed()));
QVERIFY(closedSpy.isValid());