calendarui/controller/src/calenmultipledbui.cpp
branchRCL_3
changeset 86 ed599363c2d7
parent 66 bd7edf625bdd
--- a/calendarui/controller/src/calenmultipledbui.cpp	Wed Sep 15 12:11:35 2010 +0300
+++ b/calendarui/controller/src/calenmultipledbui.cpp	Wed Oct 13 14:30:35 2010 +0300
@@ -45,8 +45,6 @@
 #include <featmgr.h>
 #include <hlplch.h>
 #include <csxhelp/cale.hlp.hrh>
-#include <calencontext.h>
-#include <calenservices.h>
 
 // User includes
 #include "calendarui_debug.h"
@@ -287,11 +285,7 @@
         delete iCalendarInfoOriginal;
         iCalendarInfoOriginal = NULL;
         }
-if(iCalEditedDefaultName)
-        {
-        delete iCalEditedDefaultName;
-        iCalEditedDefaultName = NULL;
-        }
+
     TRACE_EXIT_POINT;
     }
 
@@ -693,11 +687,6 @@
 	TInt retError = KErrNone;
     
 	iDbEditor = NULL;
-	if(iCalEditedDefaultName)
-	    {
-        delete iCalEditedDefaultName;
-        iCalEditedDefaultName = NULL;
-	    }
     
     if(aItemAdded)
         {
@@ -775,7 +764,6 @@
     
     iCalendarInfoEdited = calendarInfoList[currentIndex];
     
-    iCalEditedDefaultName = calendarInfoList[currentIndex]->FileNameL().AllocL();
     CleanupStack::PopAndDestroy(&calendarInfoList);
     
     //Take a copy of original before editing
@@ -1426,22 +1414,7 @@
         case ECalenNotifyCalendarInfoCreated:
         case ECalenNotifyCalendarInfoUpdated:
             {
-            MCalenContext& context = iController.Services().Context();
-            TDesC& aConflictCalendarName  = context.GetCalendarFileNameL();
-            TBool isSameFileEdited = EFalse;
-            if(iCalEditedDefaultName)
-                {
-                if(!iCalEditedDefaultName->CompareF(aConflictCalendarName))
-                    {
-                    isSameFileEdited = ETrue; 
-                    }
-                else
-                    {
-                    isSameFileEdited = EFalse;
-                    }
-                }
-            
-            if (iDbEditor && isSameFileEdited)
+            if (iDbEditor)
                 {
                 iConflictOccured = ETrue;
                 iDbEditor->SetConflict(CCalenMultiDBEditor::EConflictUpdate);
@@ -1450,28 +1423,7 @@
             break;
         case ECalenNotifyCalendarFileDeleted:
             {
-            RPointerArray<CCalCalendarInfo> calendarInfoList;
-            TBool isSameFileDeleted = EFalse;
-            iController.GetAllCalendarInfoL(calendarInfoList);
-            CleanupClosePushL(calendarInfoList);
-            if(iCalEditedDefaultName)
-                {
-                for(TInt i=0; i<calendarInfoList.Count(); i++)
-                    {
-                    if(!iCalEditedDefaultName->CompareF(calendarInfoList[i]->FileNameL()))
-                        {
-                        isSameFileDeleted = EFalse;
-                        break;
-                        }
-                    else
-                        {
-                        isSameFileDeleted = ETrue;
-                        }
-                    }
-                }
-            CleanupStack::PopAndDestroy(&calendarInfoList);
-            
-            if (iDbEditor && isSameFileDeleted)
+            if (iDbEditor)
                 {
                 iConflictOccured = ETrue;
                 iDbEditor->SetConflict(CCalenMultiDBEditor::EConflictDelete);
@@ -1483,7 +1435,7 @@
         }
 
     // refresh calendar list
-    TRAP_IGNORE(UpdateListboxL());
+    UpdateListboxL();
 
     TRACE_EXIT_POINT;
     }