diff -r a6539d1e8e43 -r 34879f5cfc63 phonebookengines/contactsmodel/cntplsql/src/cviewcontactmanager.cpp --- a/phonebookengines/contactsmodel/cntplsql/src/cviewcontactmanager.cpp Wed Jun 09 09:26:27 2010 +0300 +++ b/phonebookengines/contactsmodel/cntplsql/src/cviewcontactmanager.cpp Mon Jun 21 15:24:27 2010 +0300 @@ -359,9 +359,8 @@ } else if(iViewPreferences & (EUnSortedAtBeginning | EUnSortedAtEnd)) { - // It's an unsortable contact, just append its lightweight object - // to unsortable view contacts list. - contact->ChangeToLightweightObject(); + // It's an unsortable contact, + // just append it to unsortable view contacts list. iUnsortedViewContacts->AppendL(contact); CleanupStack::Pop(contact); } @@ -523,13 +522,11 @@ if(diff > 0) { resultContacts->AppendL(firstRightContact); - firstRightContact->ChangeToLightweightObject(); ++indexRight; } else { resultContacts->AppendL(firstLeftContact); - firstLeftContact->ChangeToLightweightObject(); ++indexLeft; if(diff == 0) { @@ -549,10 +546,6 @@ while(indexRight < aRightContacts.Count()) { CViewContact* firstRightContact = static_cast(aRightContacts[indexRight]); - - //change all the fullfil view objects to lightweight into the merged list. - firstRightContact->ChangeToLightweightObject(); - resultContacts->AppendL(firstRightContact); ++indexRight; } @@ -653,8 +646,6 @@ User::LeaveIfError(error); - //Make the view contact object to be lightweighted before insert to iViewContacts. - const_cast(aNewContact)->ChangeToLightweightObject(); iViewContacts->InsertL(aNewContact, position); return position; @@ -821,8 +812,6 @@ */ HBufC* CViewContactManager::AllFieldsLC(TInt aIndex, const TDesC& aSeparator) const { - TBool ifWasFullObject = EFalse; - CViewContact& viewContact = ViewContactAtL(aIndex); if(viewContact.IsLightweightObject()) { @@ -835,19 +824,10 @@ CleanupStack::PushL(contact); viewContact.CopyL(*contact); CleanupStack::PopAndDestroy(contact); - - ifWasFullObject = ETrue; } HBufC* buf = FieldsWithSeparatorLC(viewContact,aSeparator); - - if(ifWasFullObject) - { - //loadFullContent is set in ViewContactAtL if the viewContact was a lightweight object and - //loaded to be full content object in that function. So we need to change it to lightweight - //in order to save more memory. - viewContact.ChangeToLightweightObject(); - } + return buf; } @@ -893,7 +873,6 @@ { // unsortable contacts go at the end or beginning // we want this to be stable (e.g. when ICC becomes unlocked) - contact->ChangeToLightweightObject(); iUnsortedViewContacts->AppendL(contact); index = iUnsortedViewContacts->Count() - 1;