summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qgesturemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qgesturemanager.cpp')
-rw-r--r--src/gui/kernel/qgesturemanager.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index 3bdd323..994b2b6 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -141,11 +141,15 @@ bool QGestureManager::filterEvent(QEvent *event)
}
activeGestures -= newMaybeGestures;
activeGestures += startedGestures;
- foreach(QGestureRecognizer *r, startedGestures+finishedGestures+notGestures) {
- QMap<QGestureRecognizer*, int>::iterator it = maybeGestures.find(r);
- if (it != maybeGestures.end()) {
+ for(QMap<QGestureRecognizer*, int>::iterator it = maybeGestures.begin();
+ it != maybeGestures.end();) {
+ QGestureRecognizer *r = it.key();
+ if (startedGestures.contains(r) || finishedGestures.contains(r) ||
+ notGestures.contains(r)) {
killTimer(it.value());
- maybeGestures.erase(it);
+ it = maybeGestures.erase(it);
+ } else {
+ ++it;
}
}
foreach(QGestureRecognizer *r, newMaybeGestures) {