messagingapp/msgui/msgaudiofetcher/src/msgaudioselectionengine.cpp
changeset 48 4f501b74aeb1
parent 37 518b245aa84c
child 62 fdbe8253b596
--- a/messagingapp/msgui/msgaudiofetcher/src/msgaudioselectionengine.cpp	Tue Jul 13 22:09:22 2010 +0530
+++ b/messagingapp/msgui/msgaudiofetcher/src/msgaudioselectionengine.cpp	Sun Jul 25 18:59:19 2010 +0530
@@ -29,7 +29,7 @@
 // CONSTANTS
 _LIT( KAmrMime, "audio/amr" );
 
-MsgAudioSelectionEngine::MsgAudioSelectionEngine()
+MsgAudioSelectionEngine::MsgAudioSelectionEngine():iQuery(NULL)
     {
 
     }
@@ -43,7 +43,7 @@
 
 void MsgAudioSelectionEngine::CreateMetaDataSession()
 {
-    TRAP_IGNORE(iSession = CMdESession::NewL(*this));
+    QT_TRAP_THROWING(iSession = CMdESession::NewL(*this));
 }
 
 
@@ -100,7 +100,7 @@
     if (iSessionOpen)
         {
         TUint32 notificationType = ENotifyAdd | ENotifyModify | ENotifyRemove;
-        User::LeaveIfNull(iSession);
+        q_check_ptr(iSession);
         CMdENamespaceDef& defNS = iSession->GetDefaultNamespaceDefL();
         iSession->AddObjectObserverL(*this, 0, notificationType, &defNS);
         iSession->AddObjectPresentObserverL(*this);
@@ -201,13 +201,13 @@
     {
     if (!iSession || !iSessionOpen)
         {
-        User::Leave(KErrDisconnected);
+        qt_symbian_throwIfError (KErrDisconnected);
         }
     }
 
 CMdEPropertyDef& MsgAudioSelectionEngine::PropertyDefL(TInt aAttr)
     {
-    User::LeaveIfNull(iSession);
+    q_check_ptr(iSession);
     return PropertyDefL(iSession, aAttr);
     }
 
@@ -253,7 +253,7 @@
         }
     else
         {
-        User::Leave(KErrNotSupported);
+        qt_symbian_throwIfError(KErrNotSupported);
         }
 
     return objectDef.GetPropertyDefL(MdeConstants::Object::KTitleProperty);