Plug memory leak when gestures are grabbed but never triggered
When a gesture is grabbed by QAbstractScrollArea but never triggered then the deletion of the QAbstractScrollArea would mean that the gesture created for it would not be deleted. This ensures that it always deletes the gestures waiting to be deleted even if no gesture event is triggered Task-number: QTBUG-25011 Change-Id: I36118b82baaa60ac4e014896159060e1af76b2d2 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
This commit is contained in:
parent
94f7d70a4b
commit
3ec88b355b
@ -285,10 +285,8 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap<QObject *,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (triggeredGestures.isEmpty() && finishedGestures.isEmpty()
|
||||
&& newMaybeGestures.isEmpty() && notGestures.isEmpty())
|
||||
return consumeEventHint;
|
||||
|
||||
if (!triggeredGestures.isEmpty() || !finishedGestures.isEmpty()
|
||||
|| !newMaybeGestures.isEmpty() || !notGestures.isEmpty()) {
|
||||
QSet<QGesture *> startedGestures = triggeredGestures - m_activeGestures;
|
||||
triggeredGestures &= m_activeGestures;
|
||||
|
||||
@ -384,7 +382,7 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap<QObject *,
|
||||
recycle(gesture);
|
||||
m_gestureTargets.remove(gesture);
|
||||
}
|
||||
|
||||
}
|
||||
//Clean up the Gestures
|
||||
qDeleteAll(m_gesturesToDelete);
|
||||
m_gesturesToDelete.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user