Revision: 201017 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 11 May 2010 16:00:32 +0300
branchRCL_3
changeset 24 661c849b1858
parent 21 2bbcc0756c6d
child 25 8423bb7ba1d2
Revision: 201017 Kit: 201019
omads/omadsappui/AspSyncUtil/inc/AspSettingDialog.h
omads/omadsappui/AspSyncUtil/src/AspPreSyncPluginInterface.cpp
omads/omadsappui/AspSyncUtil/src/AspSettingDialog.cpp
omads/omadsappui/ui/src/NSmlDSSyncAppUi.cpp
omads/omadsextensions/dsutils/nsmldefaultagendahandler/src/nsmldefaultagendahandlerplugin.cpp
--- 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.
--- 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;
 	}
--- 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
--- 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<KBufSize128> 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") );
--- 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