src/hbcore/devicedialogbase/hbdevicedialogsym_p.cpp
changeset 5 627c4a0fd0e7
parent 0 16d8024aca5e
child 28 b7da29130b0e
child 34 ed14f46c0e55
--- a/src/hbcore/devicedialogbase/hbdevicedialogsym_p.cpp	Thu May 27 13:10:59 2010 +0300
+++ b/src/hbcore/devicedialogbase/hbdevicedialogsym_p.cpp	Fri Jun 11 13:58:22 2010 +0300
@@ -100,7 +100,7 @@
     TRACE_ENTRY
 
     if (!iBuffer) {
-        iBuffer = HBufC8::NewL(64);
+        TRAP_IGNORE(iBuffer = HBufC8::NewL(64));
         if (iBuffer) {
             iDataPtr.Set(iBuffer->Des());
         } else {
@@ -422,10 +422,13 @@
         // Any Symbian error, close session handle. It will be reopened on next show()
         if (errorCode < KErrNone) {
             mHbSession.Close();
-        }
-        // All Symbian errors are connected to HbDeviceDialogConnectError
-        if (errorCode < KErrNone) {
+            // All Symbian errors are converted to HbDeviceDialogConnectError
             errorCode = HbDeviceDialogConnectError;
+        } else {
+            // Convert from internal to public error code
+            if (errorCode == HbDeviceDialogAlreadyExists) {
+                errorCode = HbDeviceDialog::InstanceExistsError;
+            }
         }
     }
     return errorCode;