diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-28 12:11:49 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-28 12:49:31 (GMT) |
commit | 96b8e9f824daaf88cb8c153caa774a92b0261580 (patch) | |
tree | 49d6cb0e77bb91d74dcebee85addcc025ae79a41 /src/gui | |
parent | 3ce8fb5e754014ed29cabf9e33b71dabecb02e46 (diff) | |
download | Qt-96b8e9f824daaf88cb8c153caa774a92b0261580.zip Qt-96b8e9f824daaf88cb8c153caa774a92b0261580.tar.gz Qt-96b8e9f824daaf88cb8c153caa774a92b0261580.tar.bz2 |
Delete all gesture objects and recognizers when gesture manager is deleted.
When application closes and we haven't deleted the unregistered gestures
and gesture recognizer, we should delete them.
Reviewed-by: Thomas Zander
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qgesturemanager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index 04dcfe3..3eb15cf 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -83,6 +83,11 @@ QGestureManager::QGestureManager(QObject *parent) QGestureManager::~QGestureManager() { qDeleteAll(m_recognizers.values()); + foreach (QGestureRecognizer *recognizer, m_obsoleteGestures.keys()) { + qDeleteAll(m_obsoleteGestures.value(recognizer)); + delete recognizer; + } + m_obsoleteGestures.clear(); } Qt::GestureType QGestureManager::registerGestureRecognizer(QGestureRecognizer *recognizer) |