summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-03-06 11:08:48 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-05-11 13:41:39 (GMT)
commitf1d955249ff00db79252967078005db9a9fe936c (patch)
tree6b09ab4c4986cfee0f5478985788ee5674a8a8bd
parentfc84e3a05d01cce25949c605fc56dba4b4d3d183 (diff)
downloadQt-f1d955249ff00db79252967078005db9a9fe936c.zip
Qt-f1d955249ff00db79252967078005db9a9fe936c.tar.gz
Qt-f1d955249ff00db79252967078005db9a9fe936c.tar.bz2
If the event wasn't consumed by the gesture target widget, then
gesture manager should consume it as well.
-rw-r--r--src/gui/kernel/qgesturemanager.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index 2d0137e..c9bf0df 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -169,7 +169,8 @@ bool QGestureManager::filterEvent(QEvent *event)
}
Q_ASSERT(!gestures.isEmpty());
QGestureEvent event(targetWidget, gestures);
- qt_sendGestureEvent(targetWidget, &event);
+ ret = qt_sendGestureEvent(targetWidget, &event);
+ ret = ret && event.isAccepted();
if (!activeGestures.isEmpty()) {
DEBUG() << "QGestureManager: new state = Gesture";
@@ -273,7 +274,8 @@ bool QGestureManager::filterEvent(QEvent *event)
cancelledGestureNames << r->gestureType();
if(!gestures.isEmpty()) {
QGestureEvent event(targetWidget, gestures, cancelledGestureNames);
- qt_sendGestureEvent(targetWidget, &event);
+ ret = qt_sendGestureEvent(targetWidget, &event);
+ ret = ret && event.isAccepted();
}
foreach(QGestureRecognizer *r, finishedGestures)
@@ -291,7 +293,6 @@ bool QGestureManager::filterEvent(QEvent *event)
DEBUG() << "QGestureManager: new state = NotGesture";
state = NotGesture;
}
- ret = true;
}
lastPos = currentPos;