aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-07-01 13:59:28 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-07-02 07:59:51 +0000
commita76ffb65d5664cf3e953a21c2a899c5dea69fb2f (patch)
tree559930e0eab44acebb28c518102c8cb02e0c92da /tests
parent3f14cae462c890e22aa1948e1dec60d297dd0b23 (diff)
Stabilize tst_HoverHandler::movingItemWithHoverHandler()
It tries to move the "paddle" from its old position, out from under the cursor, and back under the cursor again; but it was moving its left edge to be under the cursor. That didn't necessarily work with arbitrary high-dpi scale factors. Change-Id: I8d52ed34c5d4dcc6d20c6aefa1c7bce7516138bd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 9d9ebbff2fa8735f749322300a43e1f161129480)
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/pointerhandlers/qquickhoverhandler/tst_qquickhoverhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/quick/pointerhandlers/qquickhoverhandler/tst_qquickhoverhandler.cpp b/tests/auto/quick/pointerhandlers/qquickhoverhandler/tst_qquickhoverhandler.cpp
index a35d816b85..de03edf577 100644
--- a/tests/auto/quick/pointerhandlers/qquickhoverhandler/tst_qquickhoverhandler.cpp
+++ b/tests/auto/quick/pointerhandlers/qquickhoverhandler/tst_qquickhoverhandler.cpp
@@ -313,7 +313,7 @@ void tst_HoverHandler::movingItemWithHoverHandler()
paddle->setX(100);
QTRY_COMPARE(paddleHH->isHovered(), false);
- paddle->setX(p.x());
+ paddle->setX(p.x() - paddle->width() / 2);
QTRY_COMPARE(paddleHH->isHovered(), true);
paddle->setX(540);