From 5f0eb4a64ae95a5a1ed16834c51a05e27760ff47 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 6 Jul 2021 15:09:07 +0200 Subject: 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. Change-Id: Ia8fb8a29f7cefe07d4ec86db016e51f8d71ecb06 Reviewed-by: Andrei Golubev Reviewed-by: Shawn Rutledge (cherry picked from commit 0ee5976cf25b9da0502368370b07d96914349ca0) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/qquickdrawer/tst_qquickdrawer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); -- cgit v1.2.3