summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJuha Kukkonen <juha.kukkonen@nokia.com>2011-12-13 08:59:16 +0200
committerJuha Kukkonen <juha.kukkonen@nokia.com>2011-12-13 12:02:05 +0200
commitbc0784413c2c7dcca3333d5344a1fc25fa9c9b50 (patch)
treeca7e8a88c50927df4beb6e7ff0bb08136cd50977 /plugins
parent6c47eb4c3a1bf557103c85617e44738dc5d501b2 (diff)
Fixed HapticsEffect causing application not to exit properly on Symbian
Changed plugin to release it's resources when event loop exits to ensure that plugin can be unloaded. Task-number: QTMOBILITY-1464 Task-number: ou1cimx1#948499 Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'plugins')
-rw-r--r--plugins/feedback/symbian/qfeedback_symbian.cpp7
-rw-r--r--plugins/feedback/symbian/qfeedback_symbian.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/plugins/feedback/symbian/qfeedback_symbian.cpp b/plugins/feedback/symbian/qfeedback_symbian.cpp
index 05868ef7ce..335a3e28d5 100644
--- a/plugins/feedback/symbian/qfeedback_symbian.cpp
+++ b/plugins/feedback/symbian/qfeedback_symbian.cpp
@@ -78,12 +78,19 @@ QFeedbackSymbian::QFeedbackSymbian()
#endif
initActuators();
+ connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(freeResources()));
}
QFeedbackSymbian::~QFeedbackSymbian()
{
+ freeResources();
+}
+
+void QFeedbackSymbian::freeResources()
+{
#ifdef USE_CHWRMHAPTICS_PLZ
qDeleteAll(m_haptics);
+ m_haptics.clear();
#endif
}
diff --git a/plugins/feedback/symbian/qfeedback_symbian.h b/plugins/feedback/symbian/qfeedback_symbian.h
index 337f2e8246..cdb320cb69 100644
--- a/plugins/feedback/symbian/qfeedback_symbian.h
+++ b/plugins/feedback/symbian/qfeedback_symbian.h
@@ -238,6 +238,9 @@ private:
void initActuators();
QList<QFeedbackActuator*> m_actuators;
CCoeControl *defaultWidget();
+
+private slots:
+ void freeResources();
};
#endif //HAS_CUSTOM_EFFECTS