From 6f44020cf97bd74e02ee011e6cb182aa93109b21 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 19 Feb 2010 15:00:55 +0100 Subject: Fix bad conflict resolution from 4baa9dfb5273d7b501dcb3f456983262c53cc8d1 Reviewed-by: Denis Dzyubenko --- tests/auto/gestures/tst_gestures.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp index e15bc43..24391c0 100644 --- a/tests/auto/gestures/tst_gestures.cpp +++ b/tests/auto/gestures/tst_gestures.cpp @@ -701,6 +701,9 @@ public: bool acceptGestureOverride; QSet ignoredGestures; + QSet ignoredStartedGestures; + QSet ignoredUpdatedGestures; + QSet ignoredFinishedGestures; QRectF size; int instanceNumber; @@ -713,6 +716,9 @@ public: events.clear(); overrideEvents.clear(); ignoredGestures.clear(); + ignoredStartedGestures.clear(); + ignoredUpdatedGestures.clear(); + ignoredFinishedGestures.clear(); } protected: @@ -735,6 +741,24 @@ protected: QGestureEvent *e = static_cast(event); foreach(Qt::GestureType type, ignoredGestures) e->ignore(e->gesture(type)); + foreach(QGesture *g, e->gestures()) { + switch (g->state()) { + case Qt::GestureStarted: + if (ignoredStartedGestures.contains(g->gestureType())) + e->ignore(g); + break; + case Qt::GestureUpdated: + if (ignoredUpdatedGestures.contains(g->gestureType())) + e->ignore(g); + break; + case Qt::GestureFinished: + if (ignoredFinishedGestures.contains(g->gestureType())) + e->ignore(g); + break; + default: + break; + } + } } else if (event->type() == QEvent::GestureOverride) { ++gestureOverrideEventsReceived; eventsPtr = &overrideEvents; -- cgit v0.12