From 7c59ffa73a569cb18acb05a1ee6c566f4878a1e2 Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Tue, 9 Nov 2010 14:21:38 +0100 Subject: Fixed random crash in QGestureManager. When the cachedGestures are cleaned, the Gestures should be removed in all QSets first, before the Delete. Task: QT-4013 Reviewed By: Frederik Gladhorn --- src/gui/kernel/qgesturemanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index 6dd8127..5e9a0cb 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -171,6 +171,10 @@ void QGestureManager::cleanupCachedGestures(QObject *target, Qt::GestureType typ foreach (QGesture *g, gestures) { m_deletedRecognizers.remove(g); m_gestureToRecognizer.remove(g); + m_maybeGestures.remove(g); + m_activeGestures.remove(g); + m_gestureOwners.remove(g); + m_gestureTargets.remove(g); } qDeleteAll(gestures); -- cgit v0.12