summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qgesturemanager.cpp3
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.