src/hbwidgets/devicedialogs/hbdeviceprogressdialogsymbian.cpp
changeset 5 627c4a0fd0e7
parent 2 06ff229162e9
child 21 4633027730f5
child 34 ed14f46c0e55
equal deleted inserted replaced
3:11d3954df52a 5:627c4a0fd0e7
   154         HBufC *actionData = CreateActionDataLC(iButton.iFlags.iIsNull, iButton.iText);
   154         HBufC *actionData = CreateActionDataLC(iButton.iFlags.iIsNull, iButton.iText);
   155         AddVariantL(KCancelAction, actionData, CHbSymbianVariant::EDes, iVariantMap);
   155         AddVariantL(KCancelAction, actionData, CHbSymbianVariant::EDes, iVariantMap);
   156         CleanupStack::PopAndDestroy(); // actionData
   156         CleanupStack::PopAndDestroy(); // actionData
   157         }
   157         }
   158     iButton.iFlags.iPressed = false;
   158     iButton.iFlags.iPressed = false;
   159     User::LeaveIfError(iDeviceDialog->Show(KPluginIdentifier, *iVariantMap, this));
   159     TInt error = iDeviceDialog->Show(KPluginIdentifier, *iVariantMap, this);
   160 
   160     if (error != KErrNone) {
       
   161         User::Leave(error); // error can be positive or negative
       
   162     }
   161     iVisible = ETrue;
   163     iVisible = ETrue;
   162     }
   164     }
   163 
   165 
   164 void CHbDeviceProgressDialogSymbianPrivate::Close()
   166 void CHbDeviceProgressDialogSymbianPrivate::Close()
   165     {
   167     {
   233         HBufC *actionData = CreateActionDataLC(iButton.iFlags.iIsNull, iButton.iText);
   235         HBufC *actionData = CreateActionDataLC(iButton.iFlags.iIsNull, iButton.iText);
   234         AddVariantL(KCancelAction, actionData, CHbSymbianVariant::EDes, iVariantMap);
   236         AddVariantL(KCancelAction, actionData, CHbSymbianVariant::EDes, iVariantMap);
   235         CleanupStack::PopAndDestroy(); // actionData
   237         CleanupStack::PopAndDestroy(); // actionData
   236         }
   238         }
   237 
   239 
   238     User::LeaveIfError(iDeviceDialog->Update(*map));
   240     TInt error = iDeviceDialog->Update(*map);
   239     delete map;
   241     delete map; map = 0;
   240     map = 0;
   242     if (error != KErrNone) {
       
   243         User::Leave(error); // error can be positive or negative
       
   244     }
   241     }
   245     }
   242 
   246 
   243 void CHbDeviceProgressDialogSymbianPrivate::DataReceived(CHbSymbianVariantMap& aData)
   247 void CHbDeviceProgressDialogSymbianPrivate::DataReceived(CHbSymbianVariantMap& aData)
   244     {
   248     {
   245     _LIT(KKey, "act");
   249     _LIT(KKey, "act");