Remove the unregistered recognizer from the main list
This amends 1320b2f64412f0d86bd09c66c22df845e13a94a1 to keep the behavior of removing from the main list but without re-introducing the memory leak. Fixes: QTBUG-77770 Change-Id: I91fa6cb71fab8d60baa35417fdb34322af11dbbb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 7d73d4b9a93b3132c1a24aa3ae77f0a307e821fd)
This commit is contained in:
parent
2812f0861c
commit
d1b009cbbb
@ -143,6 +143,7 @@ Qt::GestureType QGestureManager::registerGestureRecognizer(QGestureRecognizer *r
|
||||
void QGestureManager::unregisterGestureRecognizer(Qt::GestureType type)
|
||||
{
|
||||
QList<QGestureRecognizer *> list = m_recognizers.values(type);
|
||||
m_recognizers.remove(type);
|
||||
foreach (QGesture *g, m_gestureToRecognizer.keys()) {
|
||||
QGestureRecognizer *recognizer = m_gestureToRecognizer.value(g);
|
||||
if (list.contains(recognizer)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user