summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-06-02 14:20:00 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-06-02 14:50:56 (GMT)
commit25763b746eca93d53b209ab232d323b9ed3ee465 (patch)
treef5d40bc2c9881da52edc10d487f3d93022916899 /src
parenta1c8fc04c17cfbf0060c81d442ffa2440a796112 (diff)
downloadQt-25763b746eca93d53b209ab232d323b9ed3ee465.zip
Qt-25763b746eca93d53b209ab232d323b9ed3ee465.tar.gz
Qt-25763b746eca93d53b209ab232d323b9ed3ee465.tar.bz2
Fix a corner case where a gesture sometimes doesn't start.
gestures are re-used per widget / recognizer and in the case of a gesture getting cancelled we sometimes didn't properly 'start' the gesture on new incoming events since the manager forgot to mark it as not running. Add a test case and a one line fix. Reviewed-by: Denis Task-number: QTBUG-11076
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qgesturemanager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index 43facef..a81d4e4 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -684,6 +684,7 @@ void QGestureManager::recycle(QGesture *gesture)
if (recognizer) {
gesture->setGestureCancelPolicy(QGesture::CancelNone);
recognizer->reset(gesture);
+ m_activeGestures.remove(gesture);
} else {
cleanupGesturesForRemovedRecognizer(gesture);
}