1520 delete aTagList->At( i ); |
1520 delete aTagList->At( i ); |
1521 aTagList->Delete( i ); |
1521 aTagList->Delete( i ); |
1522 } |
1522 } |
1523 } |
1523 } |
1524 |
1524 |
1525 TRAPD( err, // trapping is a fix to make the function non-leaving |
1525 // TRAPD( err, // trapping is a fix to make the function non-leaving |
1526 |
1526 |
1527 // Add the tags to the to-be-deleted list. |
1527 // Add the tags to the to-be-deleted list. |
1528 // (there are 1 or 2 tags in aTagList depending on |
1528 // (there are 1 or 2 tags in aTagList depending on |
1529 // whether nickname is also there or not) |
1529 // whether nickname is also there or not) |
1530 for ( TInt k( 0 ); k < aTagList->Count(); k++ ) |
1530 TRAPD(err, |
|
1531 for ( TInt k( 0 ); k < aTagList->Count(); k++ ) |
1531 { |
1532 { |
1532 iDeleteTagListArray->AppendL( (*aTagList)[k] ); |
1533 iDeleteTagListArray->AppendL( (*aTagList)[k] ); |
1533 } |
1534 } |
1534 |
1535 ); |
|
1536 if ( err != KErrNone ) |
|
1537 { |
|
1538 // Destroy tag list |
|
1539 aTagList->Reset(); |
|
1540 delete aTagList; |
|
1541 aTagList = 0; |
|
1542 return; |
|
1543 } |
1535 // We have processed this ID |
1544 // We have processed this ID |
1536 RUBY_DEBUG1( "CNssContactHandlerImplementation::DoRemoveNamesAfterGetTagList Before removal. iDelList.Count [%d]", iDelList.Count() ); |
1545 RUBY_DEBUG1( "CNssContactHandlerImplementation::DoRemoveNamesAfterGetTagList Before removal. iDelList.Count [%d]", iDelList.Count() ); |
1537 if( iDelList.Count() > 0 ) |
1546 if( iDelList.Count() > 0 ) |
1538 { |
1547 { |
1539 iDelList.Remove( 0 ); |
1548 iDelList.Remove( 0 ); |
1569 // If we just finished converting the last ID, move to the next phase. |
1578 // If we just finished converting the last ID, move to the next phase. |
1570 else{ |
1579 else{ |
1571 RUBY_DEBUG0( "DoRemoveNamesAfterGetTagList Moving to the next phase" ); |
1580 RUBY_DEBUG0( "DoRemoveNamesAfterGetTagList Moving to the next phase" ); |
1572 DoRemoveNamesCallDeleteTag(); |
1581 DoRemoveNamesCallDeleteTag(); |
1573 } |
1582 } |
1574 ); // TRAPD |
1583 // ); // TRAPD |
1575 if( err != KErrNone ) |
1584 // if( err != KErrNone ) |
1576 { |
1585 // { |
1577 RUBY_ERROR1( "CNssContactHandlerImplementation::DoRemoveNamesAfterGetTagList Leaves with [%d] inside", err ); |
1586 // RUBY_ERROR1( "CNssContactHandlerImplementation::DoRemoveNamesAfterGetTagList Leaves with [%d] inside", err ); |
1578 } |
1587 // } |
1579 // Destroy tag list |
1588 // Destroy tag list |
1580 aTagList->Reset(); |
1589 aTagList->Reset(); |
1581 delete aTagList; |
1590 delete aTagList; |
1582 aTagList = 0; |
1591 aTagList = 0; |
1583 } |
1592 } |