summaryrefslogtreecommitdiffstats
path: root/src/widgets/util
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-11 09:24:12 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-07-14 10:25:47 +0200
commit37d5aaa4b42f9c837f0d27edb9da2185971d02be (patch)
tree867c23bfbff55f3d27dfee553ab20b015a938aa0 /src/widgets/util
parent80f7494e8a9f9a70e3b53833a098d74d8c2331d9 (diff)
Change QWindow/QWidget::map(To/From)(Global/Parent) to operate in float
Change the functions to operate in float and add the QPoint versions as overload calling them. This is more in-line with the event accessors using float and allows for removing some workarounds using a delta when converting touch points. Leave QPlatformWindow::map(To/From)Global() as is for now and add helpers for float. Change-Id: I2d46b8dbda8adff26539e358074b55073dc80b6f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/util')
-rw-r--r--src/widgets/util/qflickgesture.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/util/qflickgesture.cpp b/src/widgets/util/qflickgesture.cpp
index 7d12350c9a..3b4af0fe8f 100644
--- a/src/widgets/util/qflickgesture.cpp
+++ b/src/widgets/util/qflickgesture.cpp
@@ -297,8 +297,8 @@ protected:
#endif // QT_CONFIG(graphicsview)
if (me) {
- QMouseEvent copy(me->type(), mouseTarget->mapFromGlobal(me->globalPosition().toPoint()),
- mouseTarget->topLevelWidget()->mapFromGlobal(me->globalPosition().toPoint()), me->globalPosition(),
+ QMouseEvent copy(me->type(), mouseTarget->mapFromGlobal(me->globalPosition()),
+ mouseTarget->topLevelWidget()->mapFromGlobal(me->globalPosition()), me->globalPosition(),
me->button(), me->buttons(), me->modifiers(), me->source());
qt_sendSpontaneousEvent(mouseTarget, &copy);
}