diff options
Diffstat (limited to 'tests/auto/quick/pointerhandlers/mousearea_interop/tst_mousearea_interop.cpp')
-rw-r--r-- | tests/auto/quick/pointerhandlers/mousearea_interop/tst_mousearea_interop.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/auto/quick/pointerhandlers/mousearea_interop/tst_mousearea_interop.cpp b/tests/auto/quick/pointerhandlers/mousearea_interop/tst_mousearea_interop.cpp index fff1558bde..ffc0cc333d 100644 --- a/tests/auto/quick/pointerhandlers/mousearea_interop/tst_mousearea_interop.cpp +++ b/tests/auto/quick/pointerhandlers/mousearea_interop/tst_mousearea_interop.cpp @@ -194,19 +194,18 @@ void tst_MouseAreaInterop::hoverHandlerDoesntHoverOnPress() // QTBUG-72843 QTRY_COMPARE(handler->isHovered(), true); // move the mouse into the "button" QTest::mouseMove(&window, p); - // current behavior: the mouse is still within the HoverHandler's region of interest, but MouseArea is obstructing. - QTRY_COMPARE(handler->isHovered(), false); + // both the hoverhandler and the mouse area should now be hovered! + QTRY_COMPARE(handler->isHovered(), true); QCOMPARE(ma->hovered(), true); - // So HoverHandler is no longer hovered (unfortunately). Clicking should not change it. QSignalSpy hoveredChangedSpy(handler, SIGNAL(hoveredChanged())); QTest::mousePress(&window, Qt::LeftButton, Qt::NoModifier, p); QTRY_COMPARE(ma->pressed(), true); - QCOMPARE(handler->isHovered(), false); + QCOMPARE(handler->isHovered(), true); QCOMPARE(hoveredChangedSpy.count(), 0); QTest::mouseRelease(&window, Qt::LeftButton, Qt::NoModifier, p); QTRY_COMPARE(ma->pressed(), false); - QCOMPARE(handler->isHovered(), false); + QCOMPARE(handler->isHovered(), true); QCOMPARE(hoveredChangedSpy.count(), 0); } |