aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickcanvas.cpp
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-03-12 08:18:01 +1000
committerMatthew Vogt <matthew.vogt@nokia.com>2012-03-12 08:35:40 +1000
commit1f52c5430144eb7ba6baa7e3954675ca0707b947 (patch)
tree22106095d5cc61c7b5625c8ff2639e1530d2c3b0 /src/quick/items/qquickcanvas.cpp
parent616bbd1988f3b92f7d980b6c9a1278f11b712573 (diff)
parented74ec4c40f1476c545bcaacb12fe3a607172035 (diff)
Merge branch 'master' of git://gitorious.org/qt/qtdeclarative into api_changes
Diffstat (limited to 'src/quick/items/qquickcanvas.cpp')
-rw-r--r--src/quick/items/qquickcanvas.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp
index 170a37c979..60f1992b57 100644
--- a/src/quick/items/qquickcanvas.cpp
+++ b/src/quick/items/qquickcanvas.cpp
@@ -374,6 +374,14 @@ static QQuickMouseEventEx touchToMouseEvent(QEvent::Type type, const QTouchEvent
void QQuickCanvasPrivate::translateTouchToMouse(QTouchEvent *event)
{
+ if (event->type() == QEvent::TouchCancel) {
+ touchMouseId = -1;
+ if (!mouseGrabberItem)
+ return;
+ mouseGrabberItem->ungrabMouse();
+ mouseGrabberItem = 0;
+ return;
+ }
for (int i = 0; i < event->touchPoints().count(); ++i) {
QTouchEvent::TouchPoint p = event->touchPoints().at(i);
if (touchMouseId == -1 && p.state() & Qt::TouchPointPressed) {
@@ -1177,7 +1185,8 @@ bool QQuickCanvasPrivate::deliverWheelEvent(QQuickItem *item, QWheelEvent *event
QPointF p = item->mapFromScene(event->posF());
if (QRectF(0, 0, item->width(), item->height()).contains(p)) {
- QWheelEvent wheel(p, event->delta(), event->buttons(), event->modifiers(), event->orientation());
+ QWheelEvent wheel(p, p, event->pixelDelta(), event->angleDelta(), event->delta(),
+ event->orientation(), event->buttons(), event->modifiers());
wheel.accept();
q->sendEvent(item, &wheel);
if (wheel.isAccepted()) {