phonesettings/cpphonesettingsplugins/telephonyplugin/src/cptelephonypluginview.cpp
equal
deleted
inserted
replaced
48 { |
48 { |
49 DPRINT << ": IN"; |
49 DPRINT << ": IN"; |
50 |
50 |
51 HbDataForm *form = qobject_cast<HbDataForm*>(widget()); |
51 HbDataForm *form = qobject_cast<HbDataForm*>(widget()); |
52 if (form) { |
52 if (form) { |
53 HbDataFormModel *model = new HbDataFormModel; |
53 HbDataFormModel *model = new HbDataFormModel(form); |
54 form->setHeading(hbTrId("txt_phone_subhead_telephone")); |
54 form->setHeading(hbTrId("txt_phone_subhead_telephone")); |
55 // Create and initialize plugin's item data helper |
55 // Create and initialize plugin's item data helper |
56 m_helper = initializeItemDataHelper(); |
56 m_helper = initializeItemDataHelper(); |
57 QList<CpSettingFormItemData*> items; |
57 QList<CpSettingFormItemData*> items; |
58 |
58 |
133 Destructor. |
133 Destructor. |
134 */ |
134 */ |
135 CpTelephonyPluginView::~CpTelephonyPluginView() |
135 CpTelephonyPluginView::~CpTelephonyPluginView() |
136 { |
136 { |
137 DPRINT << ": IN"; |
137 DPRINT << ": IN"; |
|
138 qDeleteAll(m_plugins); |
138 delete m_helper; |
139 delete m_helper; |
139 DPRINT << ": OUT"; |
140 DPRINT << ": OUT"; |
140 } |
141 } |
141 |
142 |
142 /*! |
143 /*! |
150 QList<CpSettingFormItemData*> items; |
151 QList<CpSettingFormItemData*> items; |
151 CpPluginInterface *p(NULL); |
152 CpPluginInterface *p(NULL); |
152 try { |
153 try { |
153 p = CpPluginLoader::loadCpPluginInterface(plugin); |
154 p = CpPluginLoader::loadCpPluginInterface(plugin); |
154 if (p && m_helper) { |
155 if (p && m_helper) { |
|
156 m_plugins.append(p); |
155 items = p->createSettingFormItemData(*m_helper); |
157 items = p->createSettingFormItemData(*m_helper); |
156 } |
158 } |
157 } catch(...) { |
159 } catch(...) { |
158 DCRITICAL << ": CATCH ERROR, item creation failed!"; |
160 DCRITICAL << ": CATCH ERROR, item creation failed!"; |
159 delete p; |
161 delete p; |