metadataengine/client/src/mdeobject.cpp
branchRCL_3
changeset 63 e538444823de
parent 47 b73252188534
equal deleted inserted replaced
57:2872ae438bf7 63:e538444823de
   580 			}
   580 			}
   581 
   581 
   582 		CMdEProperty* oldProperty = iPropertyArray[f];
   582 		CMdEProperty* oldProperty = iPropertyArray[f];
   583 		iPropertyArray[f] = &aProperty;
   583 		iPropertyArray[f] = &aProperty;
   584 		delete oldProperty;
   584 		delete oldProperty;
   585 		oldProperty = NULL;
       
   586 		}
   585 		}
   587 	else if (err < KErrNone)
   586 	else if (err < KErrNone)
   588 		{
   587 		{
   589 		User::Leave(err);
   588 		User::Leave(err);
   590 		}
   589 		}
   742                 }
   741                 }
   743 
   742 
   744             CMdEProperty* oldProperty = iPropertyArray[f];
   743             CMdEProperty* oldProperty = iPropertyArray[f];
   745             iPropertyArray[f] = aObject.iPropertyArray[i];
   744             iPropertyArray[f] = aObject.iPropertyArray[i];
   746             delete oldProperty;
   745             delete oldProperty;
   747             oldProperty = NULL;
       
   748             }
   746             }
   749         else if (err < KErrNone)
   747         else if (err < KErrNone)
   750             {
   748             {
   751             // restore this objects to original state
   749             // restore this objects to original state
   752             iPropertyArray.Reset();
   750             iPropertyArray.Reset();
   817 		{
   815 		{
   818     	CMdEProperty* prop = iPropertyArray[i];
   816     	CMdEProperty* prop = iPropertyArray[i];
   819         if ( prop->Removed() )
   817         if ( prop->Removed() )
   820         	{
   818         	{
   821         	delete prop;
   819         	delete prop;
   822         	prop = NULL;
       
   823         	iPropertyArray.Remove( i );
   820         	iPropertyArray.Remove( i );
   824         	continue;
   821         	continue;
   825         	}
   822         	}
   826         if (aClearFlags)
   823         if (aClearFlags)
   827         	{
   824         	{
  1056 		            }
  1053 		            }
  1057 
  1054 
  1058 		        CMdEProperty* oldProperty = newObject->iPropertyArray[f];
  1055 		        CMdEProperty* oldProperty = newObject->iPropertyArray[f];
  1059 		        newObject->iPropertyArray[f] = property;
  1056 		        newObject->iPropertyArray[f] = property;
  1060 		        delete oldProperty;
  1057 		        delete oldProperty;
  1061 		        oldProperty = NULL;
       
  1062 		        }
  1058 		        }
  1063 		    else if (err < KErrNone)
  1059 		    else if (err < KErrNone)
  1064 		        {
  1060 		        {
  1065 		        User::Leave(err);
  1061 		        User::Leave(err);
  1066 		        }
  1062 		        }