aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickdraghandler.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2017-09-03 18:42:09 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2017-09-05 11:52:48 +0000
commit2617ac5b9df7dfdecf0cb02d5933c40df1a55bbc (patch)
treeb14cbc0f7335a0397e09014e1953213d086b9ffa /src/quick/handlers/qquickdraghandler.cpp
parentbe3559470ac934dcfed881996be0eeb1269e6f96 (diff)
rename QQuickEventPoint pos properties to position
For consistency we always spell it out, although it does make some of these properties inconveniently verbose. Change-Id: I64a08c3aa261c0ab89e09472dd47510abafbf7ca Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickdraghandler.cpp')
-rw-r--r--src/quick/handlers/qquickdraghandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/handlers/qquickdraghandler.cpp b/src/quick/handlers/qquickdraghandler.cpp
index 49b391c7d5..840459ba3e 100644
--- a/src/quick/handlers/qquickdraghandler.cpp
+++ b/src/quick/handlers/qquickdraghandler.cpp
@@ -97,7 +97,7 @@ void QQuickDragHandler::handleEventPoint(QQuickEventPoint *point)
setPassiveGrab(point);
break;
case QQuickEventPoint::Updated: {
- QPointF delta = point->scenePos() - point->scenePressPos();
+ QPointF delta = point->scenePosition() - point->scenePressPosition();
if (!m_xAxis.enabled())
delta.setX(0);
if (!m_yAxis.enabled())
@@ -151,10 +151,10 @@ void QQuickDragHandler::initializeTargetStartPos(QQuickEventPoint *point)
{
if (target() && target()->parentItem() && m_targetStartPos.isNull()) { // prefer the m_targetStartPos we got when it got Pressed.
m_targetStartPos = target()->parentItem()->mapToScene(target()->position());
- if (!target()->contains(point->pos())) {
+ if (!target()->contains(point->position())) {
// If pressed outside of target item, move the target item so that the touchpoint is in its center,
// while still respecting the axis constraints.
- const QPointF center = target()->parentItem()->mapFromScene(point->scenePos());
+ const QPointF center = target()->parentItem()->mapFromScene(point->scenePosition());
const QPointF pointCenteredInItemPos = target()->parentItem()->mapToScene(center - QPointF(target()->width(), target()->height())/2);
if (m_xAxis.enabled())
m_targetStartPos.setX(pointCenteredInItemPos.x());