diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-05-07 10:38:21 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-05-18 12:44:05 (GMT) |
commit | 4ec480ef000d60c2a177db29686b4aeb2511532f (patch) | |
tree | b8b036736a025ff0ed9c6c94ffe74bfe54594fd1 /src/gui/kernel/qgesturemanager.cpp | |
parent | 4fd9c8b5ca8ab43793c9b9d4e9cbd8ed6e6d9a46 (diff) | |
download | Qt-4ec480ef000d60c2a177db29686b4aeb2511532f.zip Qt-4ec480ef000d60c2a177db29686b4aeb2511532f.tar.gz Qt-4ec480ef000d60c2a177db29686b4aeb2511532f.tar.bz2 |
Fixes a crash and a memory leak in gesturemanager.
need to remove a QGesture object pointer from an internal hash when the
widget/graphicsobject gets destroyed.
Task-number: QTBUG-9801
Reviewed-by: Thomas Zander
Diffstat (limited to 'src/gui/kernel/qgesturemanager.cpp')
-rw-r--r-- | src/gui/kernel/qgesturemanager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index 9495f40..6fad18c 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -161,8 +161,10 @@ void QGestureManager::cleanupCachedGestures(QObject *target, Qt::GestureType typ it = m_obsoleteGestures.begin(), e = m_obsoleteGestures.end(); it != e; ++it) { it.value() -= gestures; } - foreach (QGesture *g, gestures) + foreach (QGesture *g, gestures) { m_deletedRecognizers.remove(g); + m_gestureToRecognizer.remove(g); + } qDeleteAll(gestures); iter = m_objectGestures.erase(iter); } else { |