diff options
author | Thomas Zander <thomas.zander@trolltech.com> | 2009-10-23 13:43:50 (GMT) |
---|---|---|
committer | Thomas Zander <thomas.zander@trolltech.com> | 2009-10-26 11:22:12 (GMT) |
commit | 487570340062a1165e0473e2557f844b097db526 (patch) | |
tree | cd89394fdd4f194cd20fc713bacf52f9c114211e /src/gui | |
parent | 25bc5c29db866d5abc3f9fbae7b5211e2e6b1f25 (diff) | |
download | Qt-487570340062a1165e0473e2557f844b097db526.zip Qt-487570340062a1165e0473e2557f844b097db526.tar.gz Qt-487570340062a1165e0473e2557f844b097db526.tar.bz2 |
Fix memory leaks in the gesture manager
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qgesturemanager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index df88f9e..0139533 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -82,7 +82,7 @@ QGestureManager::QGestureManager(QObject *parent) QGestureManager::~QGestureManager() { - + qDeleteAll(recognizers.values()); } Qt::GestureType QGestureManager::registerGestureRecognizer(QGestureRecognizer *recognizer) @@ -166,6 +166,7 @@ QGesture *QGestureManager::getState(QObject *object, Qt::GestureType type) state = recognizer->createGesture(object); if (!state) return 0; + state->setParent(this); if (state->gestureType() == Qt::CustomGesture) { // if the recognizer didn't fill in the gesture type, then this // is a custom gesture with autogenerated it and we fill it. |