diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2021-07-06 15:09:07 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2021-07-12 11:25:42 +0200 |
commit | 5f0eb4a64ae95a5a1ed16834c51a05e27760ff47 (patch) | |
tree | a06f64983cd4f46363ea619942a82669dd2fa8a4 | |
parent | c4dd746df5935064ae3fa5222d0f768ce1062726 (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.
Change-Id: Ia8fb8a29f7cefe07d4ec86db016e51f8d71ecb06
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 0ee5976cf25b9da0502368370b07d96914349ca0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | tests/auto/qquickdrawer/tst_qquickdrawer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp index 57393d7a6e..2c7ec045fe 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()); |