pimappservices/calendar/server/src/agsentrymodel.cpp
branchRCL_3
changeset 13 0f07cd1b5772
parent 12 38571fd2a704
child 30 d68a4b5d5885
equal deleted inserted replaced
12:38571fd2a704 13:0f07cd1b5772
   509 			else 
   509 			else 
   510 				{
   510 				{
   511 				_DBGLOG_VERBOSE(AgmDebug::DebugLog("StoreL: Existing entry types is different to incoming entry's type");)
   511 				_DBGLOG_VERBOSE(AgmDebug::DebugLog("StoreL: Existing entry types is different to incoming entry's type");)
   512 				_DBGLOG_VERBOSE(AgmDebug::DebugLog("StoreL: Delete the existing entry and add the incoming entry as a new one");)
   512 				_DBGLOG_VERBOSE(AgmDebug::DebugLog("StoreL: Delete the existing entry and add the incoming entry as a new one");)
   513 				
   513 				
   514 				// if the entry is a different type, delete the old entry and add the new one 
   514 				// if the entry is a different type, add the new one first and delete only later
       
   515                 // This change is needed if the entry having attachments, it will be shared by two 
       
   516                 //entries, so that attachments will not be deleted, while deleting it later. 
       
   517 				returnId = AddEntryL(aEntry);
   515 				DeleteEntryL(*existingEntryToReplace, ETrue, iChangeFilter);
   518 				DeleteEntryL(*existingEntryToReplace, ETrue, iChangeFilter);
   516 				returnId = AddEntryL(aEntry);
       
   517 				}
   519 				}
   518 
   520 
   519 			CleanupStack::PopAndDestroy(existingEntryToReplace);
   521 			CleanupStack::PopAndDestroy(existingEntryToReplace);
   520 			}
   522 			}
   521 		else
   523 		else