summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qgesturemanager.cpp
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-10-28 12:11:49 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-10-28 12:49:31 (GMT)
commit96b8e9f824daaf88cb8c153caa774a92b0261580 (patch)
tree49d6cb0e77bb91d74dcebee85addcc025ae79a41 /src/gui/kernel/qgesturemanager.cpp
parent3ce8fb5e754014ed29cabf9e33b71dabecb02e46 (diff)
downloadQt-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/kernel/qgesturemanager.cpp')
-rw-r--r--src/gui/kernel/qgesturemanager.cpp5
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)