summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-10-27 09:41:32 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-10-27 14:21:40 (GMT)
commitfcd8edaf6e17463603d81525f2b57fc11f20216b (patch)
treecb0209a033042edf87173f6a0abcb0e9b3fa1c57 /src/gui
parente5c87d92fa6380c13ff47ce1fe6d85a02dc92794 (diff)
downloadQt-fcd8edaf6e17463603d81525f2b57fc11f20216b.zip
Qt-fcd8edaf6e17463603d81525f2b57fc11f20216b.tar.gz
Qt-fcd8edaf6e17463603d81525f2b57fc11f20216b.tar.bz2
Implemented QGestureRecognizer::ConsumeEventHint
Reviewed-By: trustme
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qgesturemanager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index 9890a12..52f8eef 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -196,6 +196,8 @@ bool QGestureManager::filterEventThroughContexts(const QMap<QObject *,
// TODO: sort contexts by the gesture type and check if one of the contexts
// is already active.
+ bool ret = false;
+
// filter the event through recognizers
typedef QMap<QObject *, Qt::GestureType>::const_iterator ContextIterator;
for (ContextIterator cit = contexts.begin(), ce = contexts.end(); cit != ce; ++cit) {
@@ -232,7 +234,7 @@ bool QGestureManager::filterEventThroughContexts(const QMap<QObject *,
if (result & QGestureRecognizer::ConsumeEventHint) {
DEBUG() << "QGestureManager: we were asked to consume the event: "
<< state;
- //TODO: consume events if asked
+ ret = true;
}
}
}
@@ -332,7 +334,7 @@ bool QGestureManager::filterEventThroughContexts(const QMap<QObject *,
cleanupGesturesForRemovedRecognizer(gesture);
gestureTargets.remove(gesture);
}
- return false;
+ return ret;
}
void QGestureManager::cleanupGesturesForRemovedRecognizer(QGesture *gesture)