diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/quick/pointerhandlers/mousearea_interop/tst_mousearea_interop.cpp | 9 | ||||
-rw-r--r-- | tests/auto/quick/pointerhandlers/qquickhoverhandler/tst_qquickhoverhandler.cpp | 8 |
2 files changed, 8 insertions, 9 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); } diff --git a/tests/auto/quick/pointerhandlers/qquickhoverhandler/tst_qquickhoverhandler.cpp b/tests/auto/quick/pointerhandlers/qquickhoverhandler/tst_qquickhoverhandler.cpp index c94b8839dd..219c322f75 100644 --- a/tests/auto/quick/pointerhandlers/qquickhoverhandler/tst_qquickhoverhandler.cpp +++ b/tests/auto/quick/pointerhandlers/qquickhoverhandler/tst_qquickhoverhandler.cpp @@ -192,8 +192,8 @@ void tst_HoverHandler::mouseAreaAndUnderlyingHoverHandler() #endif QTest::mouseMove(window, buttonCenter); - QCOMPARE(topSidebarHH->isHovered(), false); - QCOMPARE(sidebarHoveredSpy.count(), 2); + QCOMPARE(topSidebarHH->isHovered(), true); + QCOMPARE(sidebarHoveredSpy.count(), 1); QCOMPARE(buttonMA->hovered(), true); QCOMPARE(buttonHoveredSpy.count(), 1); #if QT_CONFIG(cursor) @@ -202,7 +202,7 @@ void tst_HoverHandler::mouseAreaAndUnderlyingHoverHandler() QTest::mouseMove(window, rightOfButton); QCOMPARE(topSidebarHH->isHovered(), true); - QCOMPARE(sidebarHoveredSpy.count(), 3); + QCOMPARE(sidebarHoveredSpy.count(), 1); QCOMPARE(buttonMA->hovered(), false); QCOMPARE(buttonHoveredSpy.count(), 2); #if QT_CONFIG(cursor) @@ -211,7 +211,7 @@ void tst_HoverHandler::mouseAreaAndUnderlyingHoverHandler() QTest::mouseMove(window, outOfSidebar); QCOMPARE(topSidebarHH->isHovered(), false); - QCOMPARE(sidebarHoveredSpy.count(), 4); + QCOMPARE(sidebarHoveredSpy.count(), 2); QCOMPARE(buttonMA->hovered(), false); QCOMPARE(buttonHoveredSpy.count(), 2); #if QT_CONFIG(cursor) |