diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-02-19 14:00:55 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-02-19 14:00:55 (GMT) |
commit | 6f44020cf97bd74e02ee011e6cb182aa93109b21 (patch) | |
tree | ade40b7824127a2213007419dddd68fd89300ae1 /tests/auto/gestures | |
parent | 42567d2e4d85e001f77767cabea8acb06daeb94d (diff) | |
download | Qt-6f44020cf97bd74e02ee011e6cb182aa93109b21.zip Qt-6f44020cf97bd74e02ee011e6cb182aa93109b21.tar.gz Qt-6f44020cf97bd74e02ee011e6cb182aa93109b21.tar.bz2 |
Fix bad conflict resolution from 4baa9dfb5273d7b501dcb3f456983262c53cc8d1
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'tests/auto/gestures')
-rw-r--r-- | tests/auto/gestures/tst_gestures.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
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<Qt::GestureType> ignoredGestures; + QSet<Qt::GestureType> ignoredStartedGestures; + QSet<Qt::GestureType> ignoredUpdatedGestures; + QSet<Qt::GestureType> 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<QGestureEvent *>(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; |