messagingapp/msgui/appengine/src/conversationsengine.cpp
changeset 52 12db4185673b
parent 44 36f374c67aa8
child 72 6f657153cbc5
--- a/messagingapp/msgui/appengine/src/conversationsengine.cpp	Tue Jul 06 14:12:40 2010 +0300
+++ b/messagingapp/msgui/appengine/src/conversationsengine.cpp	Wed Aug 18 09:45:25 2010 +0300
@@ -47,14 +47,15 @@
 ConversationsEngine::ConversationsEngine(QObject* parent):
     QObject(parent), mDraftsModel(NULL)
 {
-    mConversationMsgStoreHandler = new ConversationMsgStoreHandler;
+    mConversationMsgStoreHandler = q_check_ptr(new ConversationMsgStoreHandler);
+    
     mConversationsSummaryModel = new ConversationsSummaryModel(this);    
     mConversationsModel = new ConversationsModel(mConversationMsgStoreHandler,
         this);   
 
-    d_ptr = new ConversationsEnginePrivate(mConversationMsgStoreHandler,
+    d_ptr = q_check_ptr( new ConversationsEnginePrivate(mConversationMsgStoreHandler,
         mConversationsSummaryModel,
-        mConversationsModel);
+        mConversationsModel));
     
     connect (mConversationsModel,
             SIGNAL(conversationViewEmpty()),
@@ -170,6 +171,7 @@
 {
     int error;
     TRAP(error, d_ptr->deleteAllDraftMessagesL());
+    qt_symbian_throwIfError(error);
 }
 
 //---------------------------------------------------------------
@@ -227,7 +229,9 @@
         int error;
         CCsClientConversation* clientConv = NULL;
         TRAP(error, clientConv = d_ptr->getConversationFromConversationIdL(conversationId));
-
+       
+        qt_symbian_throwIfError(error);
+        
         HBufC *name = clientConv->GetDisplayName();
         if (name && name->Length())
         {
@@ -329,7 +333,7 @@
         int newConversationId)
 {
     //also register for subscription now
-    d_ptr->registerAgainForConversationUpdatesL(newConversationId);   
+    QT_TRAP_THROWING(d_ptr->registerAgainForConversationUpdatesL(newConversationId));   
 }
 
 //---------------------------------------------------------------