equal
deleted
inserted
replaced
212 QList<QObject*> *dataPlugins = mPluginFactory->pluginInstances(); |
212 QList<QObject*> *dataPlugins = mPluginFactory->pluginInstances(); |
213 for (int i = 0; i < dataPlugins->count(); i++) { |
213 for (int i = 0; i < dataPlugins->count(); i++) { |
214 QObject *plugin = (*dataPlugins)[i]; |
214 QObject *plugin = (*dataPlugins)[i]; |
215 if (plugin) { |
215 if (plugin) { |
216 connect(plugin, SIGNAL(mailboxEvent(NmMailboxEvent, const QList<NmId> &)), |
216 connect(plugin, SIGNAL(mailboxEvent(NmMailboxEvent, const QList<NmId> &)), |
217 mMailboxListModel, SLOT(handleMailboxEvent(NmMailboxEvent, const QList<NmId> &))); |
217 mMailboxListModel, SLOT(handleMailboxEvent(NmMailboxEvent, const QList<NmId> &)), |
|
218 Qt::UniqueConnection); |
218 } |
219 } |
219 } |
220 } |
220 } else { |
221 } else { |
221 mMailboxListModel->clear(); |
222 mMailboxListModel->clear(); |
222 } |
223 } |
236 object is not moved to the caller. |
237 object is not moved to the caller. |
237 */ |
238 */ |
238 NmMessageListModel &NmUiEngine::messageListModel(const NmId &mailboxId, |
239 NmMessageListModel &NmUiEngine::messageListModel(const NmId &mailboxId, |
239 const NmId &folderId) |
240 const NmId &folderId) |
240 { |
241 { |
|
242 NM_TIMESTAMP("NmUiEngine::messageListModel begins ***"); |
|
243 |
241 QObject *plugin = mPluginFactory->pluginInstance(mailboxId); |
244 QObject *plugin = mPluginFactory->pluginInstance(mailboxId); |
242 bool isInbox(false); |
245 bool isInbox(false); |
243 if (standardFolderId(mailboxId,NmFolderInbox)==folderId){ |
246 if (standardFolderId(mailboxId,NmFolderInbox)==folderId){ |
244 isInbox=true; |
247 isInbox=true; |
245 } |
248 } |
281 } |
284 } |
282 } |
285 } |
283 else { |
286 else { |
284 ret = mMessageListModel; |
287 ret = mMessageListModel; |
285 } |
288 } |
286 return *ret; |
289 |
|
290 NM_TIMESTAMP("NmUiEngine::messageListModel ends ***"); |
|
291 |
|
292 return *ret; |
287 } |
293 } |
288 |
294 |
289 |
295 |
290 /*! |
296 /*! |
291 Returns a message list model used in the search view. |
297 Returns a message list model used in the search view. |
1126 for (int i(0); i < mailboxIds.count(); i++) { |
1132 for (int i(0); i < mailboxIds.count(); i++) { |
1127 emit mailboxDeleted(mailboxIds[i]); |
1133 emit mailboxDeleted(mailboxIds[i]); |
1128 } |
1134 } |
1129 break; |
1135 break; |
1130 } |
1136 } |
|
1137 case NmMailboxCreated: |
|
1138 { |
|
1139 if( mailboxIds.count() ){ |
|
1140 NmDataPluginInterface *pluginInterface = |
|
1141 mPluginFactory->interfaceInstance(mailboxIds.at(0)); |
|
1142 |
|
1143 if (pluginInterface) { |
|
1144 pluginInterface->subscribeMailboxEvents(mailboxIds.at(0)); |
|
1145 } |
|
1146 } |
|
1147 } |
|
1148 break; |
1131 default: |
1149 default: |
1132 break; |
1150 break; |
1133 } |
1151 } |
1134 } |
1152 } |
1135 |
1153 |