diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2011-12-30 13:45:40 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-30 07:28:39 +0100 |
commit | 017a82c6702768aed68c34f319fa14da591f3df2 (patch) | |
tree | 8d3fe0e90ae40cf236769e25a440148c67225865 /src/quick/items/qquickmultipointtoucharea.cpp | |
parent | ae739f001626de8f1f04f3f325488978870b0369 (diff) |
touchUpdated should be called for release and cancel.
touchUpdated should be emitted whenever the touch is updated, even if the
update means there are no longer any valid touch points.
Change-Id: Iceac5a65094784928108acc764bbc1d5c2b9a08a
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/quick/items/qquickmultipointtoucharea.cpp')
-rw-r--r-- | src/quick/items/qquickmultipointtoucharea.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquickmultipointtoucharea.cpp b/src/quick/items/qquickmultipointtoucharea.cpp index 461c237657..8f27f04273 100644 --- a/src/quick/items/qquickmultipointtoucharea.cpp +++ b/src/quick/items/qquickmultipointtoucharea.cpp @@ -281,7 +281,7 @@ void QQuickTouchPoint::setSceneY(qreal sceneY) \qmlsignal QtQuick2::MultiPointTouchArea::touchUpdated(list<TouchPoint> touchPoints) This handler is called when the touch points handled by the MultiPointTouchArea change. This includes adding new touch points, - removing previous touch points, as well as updating current touch point data. \a touchPoints is the list of all current touch + removing or canceling previous touch points, as well as updating current touch point data. \a touchPoints is the list of all current touch points. */ @@ -480,7 +480,7 @@ void QQuickMultiPointTouchArea::updateTouchData(QEvent *event) if (ended) emit touchPointsReleased(_releasedTouchPoints); if (moved) emit touchPointsUpdated(_movedTouchPoints); if (started) emit touchPointsPressed(_pressedTouchPoints); - if (!_touchPoints.isEmpty()) emit touchUpdated(_touchPoints.values()); + if (ended || moved || started) emit touchUpdated(_touchPoints.values()); } } @@ -597,6 +597,7 @@ void QQuickMultiPointTouchArea::ungrab() dtp->setInUse(false); } _touchPoints.clear(); + emit touchUpdated(QList<QObject*>()); } } |