phonesettings/cpphonesettingsplugins/telephonyplugin/src/cptelephonypluginview.cpp
changeset 64 6aaf0276100e
parent 56 5bcb308bd24d
child 78 baacf668fe89
--- a/phonesettings/cpphonesettingsplugins/telephonyplugin/src/cptelephonypluginview.cpp	Wed Aug 18 09:48:26 2010 +0300
+++ b/phonesettings/cpphonesettingsplugins/telephonyplugin/src/cptelephonypluginview.cpp	Thu Sep 02 20:26:16 2010 +0300
@@ -50,7 +50,7 @@
     
     HbDataForm *form = qobject_cast<HbDataForm*>(widget());
     if (form) {
-        HbDataFormModel *model = new HbDataFormModel;
+        HbDataFormModel *model = new HbDataFormModel(form);
         form->setHeading(hbTrId("txt_phone_subhead_telephone"));
         // Create and initialize plugin's item data helper
         m_helper = initializeItemDataHelper(); 
@@ -135,6 +135,7 @@
 CpTelephonyPluginView::~CpTelephonyPluginView()
 {
     DPRINT << ": IN";
+    qDeleteAll(m_plugins);
     delete m_helper;
     DPRINT << ": OUT";
 }
@@ -152,6 +153,7 @@
     try {
         p = CpPluginLoader::loadCpPluginInterface(plugin);
         if (p && m_helper) {
+            m_plugins.append(p);
             items = p->createSettingFormItemData(*m_helper);
         }
     } catch(...) {