# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1273582832 -10800 # Node ID 661c849b1858722a25f7d009787e728f6a55406c # Parent 2bbcc0756c6dcb7b62174f76eedf70638f6b2f84 Revision: 201017 Kit: 201019 diff -r 2bbcc0756c6d -r 661c849b1858 omads/omadsappui/AspSyncUtil/inc/AspSettingDialog.h --- a/omads/omadsappui/AspSyncUtil/inc/AspSettingDialog.h Tue Apr 27 16:23:46 2010 +0300 +++ b/omads/omadsappui/AspSyncUtil/inc/AspSettingDialog.h Tue May 11 16:00:32 2010 +0300 @@ -674,6 +674,9 @@ // for bearer type list construction CAspBearerHandler* iBearerHandler; + + // to know whether autosyncdialog is active or not + TBool iAutoSyncDialog; #ifdef RD_DSUI_TIMEDSYNC // Tab group owned by the navigation decorator. diff -r 2bbcc0756c6d -r 661c849b1858 omads/omadsappui/AspSyncUtil/src/AspPreSyncPluginInterface.cpp --- a/omads/omadsappui/AspSyncUtil/src/AspPreSyncPluginInterface.cpp Tue Apr 27 16:23:46 2010 +0300 +++ b/omads/omadsappui/AspSyncUtil/src/AspPreSyncPluginInterface.cpp Tue May 11 16:00:32 2010 +0300 @@ -105,7 +105,7 @@ if (error != KErrNone) { CleanupStack::PopAndDestroy( &infoArray ); - return NULL; + User::Leave( error ); } // Instantiate plugins for all impUIds by calling // InstantiatePlugInFromImpUidL @@ -122,6 +122,7 @@ //instantiate plugin for impUid defaultSyncPlugin = InstantiatePlugInFromImpUidL( impUid ); defaultSyncPlugin->SetProfile(aProfileId); + break; } else { @@ -142,11 +143,7 @@ CleanupStack::PopAndDestroy( &infoArray ); if(bHandleSync) { - //delete defaultSyncPlugin; - if(defaultSyncPlugin != NULL) - { - delete defaultSyncPlugin; - } + delete defaultSyncPlugin; CleanupStack::PushL(syncPlugin); return syncPlugin; } diff -r 2bbcc0756c6d -r 661c849b1858 omads/omadsappui/AspSyncUtil/src/AspSettingDialog.cpp --- a/omads/omadsappui/AspSyncUtil/src/AspSettingDialog.cpp Tue Apr 27 16:23:46 2010 +0300 +++ b/omads/omadsappui/AspSyncUtil/src/AspSettingDialog.cpp Tue May 11 16:00:32 2010 +0300 @@ -136,6 +136,8 @@ iStatusPaneHandler = CStatusPaneHandler::NewL(iAvkonAppUi); iStatusPaneHandler->StoreOriginalTitleL(); + iAutoSyncDialog = EFalse; + #ifdef RD_DSUI_TIMEDSYNC iTabHandler = new (ELeave) CAspTabbedNaviPaneHandler(iAvkonAppUi->StatusPane() ,this); @@ -386,7 +388,14 @@ // Back key (cba) if (aButtonId == EAknSoftkeyBack) { - return ETrue; + if( iAutoSyncDialog ) + { + return EFalse; + } + else + { + return ETrue; + } } // Exit key (cba) @@ -1841,8 +1850,10 @@ param.iProfileList = iProfileList; param.iProfile = NULL; param.iContentList = iContentList; + iAutoSyncDialog = ETrue; CAspScheduleDialog::ShowDialogL(param); - + iAutoSyncDialog = EFalse; + #ifdef RD_DSUI_TIMEDSYNC UpdateTabsL(); #endif diff -r 2bbcc0756c6d -r 661c849b1858 omads/omadsappui/ui/src/NSmlDSSyncAppUi.cpp --- a/omads/omadsappui/ui/src/NSmlDSSyncAppUi.cpp Tue Apr 27 16:23:46 2010 +0300 +++ b/omads/omadsappui/ui/src/NSmlDSSyncAppUi.cpp Tue May 11 16:00:32 2010 +0300 @@ -66,7 +66,11 @@ TBuf buf; CNSmlDSSyncDocument* document= STATIC_CAST(CNSmlDSSyncDocument*, Document()); - document->Model()->ShowSettingsL(0, KModeDialogNoWait, buf); + TRAPD(err, document->Model()->ShowSettingsL(0, KModeDialogNoWait, buf)); + if(err != KErrNone) + { + iAvkonAppUi->Exit(); + } } FLOG( _L("CNSmlDSSyncAppUi::ConstructL END") ); diff -r 2bbcc0756c6d -r 661c849b1858 omads/omadsextensions/dsutils/nsmldefaultagendahandler/src/nsmldefaultagendahandlerplugin.cpp --- a/omads/omadsextensions/dsutils/nsmldefaultagendahandler/src/nsmldefaultagendahandlerplugin.cpp Tue Apr 27 16:23:46 2010 +0300 +++ b/omads/omadsextensions/dsutils/nsmldefaultagendahandler/src/nsmldefaultagendahandlerplugin.cpp Tue May 11 16:00:32 2010 +0300 @@ -237,6 +237,9 @@ if( err != KErrNone ) { FLOG(_L("CNSmlDefaultAgendaHandlerPlugin::SynchronizableCalendarIdsL: Error while retrieving CalFile Property: '%d'"), err); + CleanupStack::PopAndDestroy(caleninfo); + CleanupStack::PopAndDestroy(vCalSubSession); + continue; } //Get OWNER value associated with the CalFile