aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickflickable.cpp
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@qt.io>2016-12-23 15:30:33 +0100
committerJan Arve Sæther <jan-arve.saether@qt.io>2016-12-29 10:27:49 +0000
commit70113ef66b245e58ce12e2a9d26268e2eaeb3a42 (patch)
treec3882090db4e76aac1e5c5e7c8da13b41db4806c /src/quick/items/qquickflickable.cpp
parent953b5070160a3a1bed7aaf986a1bb1c3b33b0dca (diff)
Don't assume that target is the parent item
To summarize: A pointer handler always gets its pointer events from its parent item. It applies its effect (drag, pinch, ...) on the item referenced to by the target property. By default, target refers to the parent, but that is not always the case. In addition to this we also have to handle the case when the target is null Change-Id: If62108abf0aeb713906bf88472ad9a32a74efff6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquickflickable.cpp')
-rw-r--r--src/quick/items/qquickflickable.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index 5561f8d976..80e34b033d 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -1785,8 +1785,6 @@ void QQuickFlickablePrivate::data_append(QQmlListProperty<QObject> *prop, QObjec
i->setParentItem(static_cast<QQuickFlickablePrivate*>(prop->data)->contentItem);
} else {
o->setParent(prop->object); // XXX todo - do we want this?
- if (QQuickPointerHandler *pointerHandler = qmlobject_cast<QQuickPointerHandler *>(o))
- pointerHandler->setTarget(static_cast<QQuickItem *>(prop->object));
}
}