phonebookui/Phonebook2/CommandsExtension/src/CPbk2DeleteContactsCmd.cpp
branchRCL_3
changeset 23 5586b4d2ec3e
parent 3 04ab22b956c2
child 64 c1e8ba0c2b16
equal deleted inserted replaced
21:b3431bff8c19 23:5586b4d2ec3e
   237             if ( iContactIterator )
   237             if ( iContactIterator )
   238                 {
   238                 {
   239                 iContactIterator->SetToFirst();
   239                 iContactIterator->SetToFirst();
   240                 if ( iContactIterator->HasNext() )
   240                 if ( iContactIterator->HasNext() )
   241                     {
   241                     {
   242                     MVPbkContactLink* link = iContactIterator->NextL();
   242                     while ( MVPbkContactLink* link = iContactIterator->NextL() )
   243                     CleanupDeletePushL( link );
       
   244                     if ( link )
       
   245                         {
   243                         {
   246                         RetrieveContactL( *link );
   244                         if ( !IsFromReadOnlyStore( *link ) )
   247                         }                    
   245                             {
   248                     CleanupStack::PopAndDestroy(); // link
   246                             CleanupDeletePushL( link );
       
   247                             RetrieveContactL( *link );
       
   248                             CleanupStack::PopAndDestroy(); // link
       
   249                             break;
       
   250                             }
       
   251                         }
   249                     }                   
   252                     }                   
   250                 }
   253                 }
   251             else
   254             else
   252                 {
   255                 {
   253                 if (iUiControl)
   256                 if (iUiControl)