diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-05-28 09:23:45 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-06-04 07:11:38 +0000 |
commit | 2d10f0a06c4aa99257cafb6729034f9f843fb31c (patch) | |
tree | 34038670f3f3176f034b86e9d9e57d6525a6e722 /src/imports/location/qdeclarativegeomapgesturearea.cpp | |
parent | 8f746984beaae891b3f223bf09f1206d8040d670 (diff) |
Rewrite flick and pinch unit tests, fix corner cases
Current implementation of flick and pinch test is error
prone. Current tests depends on each other, which makes
them not usable for qa. Instead of using one large test
function, split test for self contain tests.
Add test for filtering and fix pinch handling accordingly.
New tests cover the case when there are interactive elements like
MouseArea or ScrollView behind or in front of map element.
Change-Id: I47b0f5ae8af65bf0d8110fece7b79e56a89d9534
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
Diffstat (limited to 'src/imports/location/qdeclarativegeomapgesturearea.cpp')
-rw-r--r-- | src/imports/location/qdeclarativegeomapgesturearea.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/imports/location/qdeclarativegeomapgesturearea.cpp b/src/imports/location/qdeclarativegeomapgesturearea.cpp index 2fabd2b3..8732d79b 100644 --- a/src/imports/location/qdeclarativegeomapgesturearea.cpp +++ b/src/imports/location/qdeclarativegeomapgesturearea.cpp @@ -609,7 +609,8 @@ void QDeclarativeGeoMapGestureArea::handleMouseReleaseEvent(QMouseEvent *event) void QDeclarativeGeoMapGestureArea::handleMouseUngrabEvent() { m_mousePoint.reset(); - update(); + if (m_touchPoints.isEmpty()) + update(); } /*! @@ -629,6 +630,8 @@ void QDeclarativeGeoMapGestureArea::handleTouchEvent(QTouchEvent *event) m_touchPoints.clear(); for (int i = 0; i < event->touchPoints().count(); ++i) m_touchPoints << event->touchPoints().at(i); + if (event->touchPoints().count() >= 2) + event->accept(); update(); } |