phoneengine/PhoneCntFinder/ContactService/src/cphcntspeeddialimpl.cpp
branchRCL_3
changeset 22 94dc1107e8b2
parent 0 5f000ab63145
child 23 40a3f856b14d
equal deleted inserted replaced
20:3c221667e687 22:94dc1107e8b2
   104 void CPhCntSpeedDialImpl::CopyContactInfoToFieldInfoL( 
   104 void CPhCntSpeedDialImpl::CopyContactInfoToFieldInfoL( 
   105         CPhCntContact& aContact,
   105         CPhCntContact& aContact,
   106         TInt aSpeedDialPosition, 
   106         TInt aSpeedDialPosition, 
   107         TSpdDialFieldInfo& aFieldInfo )
   107         TSpdDialFieldInfo& aFieldInfo )
   108     {
   108     {
   109     
       
   110     MVPbkContactLink* contactLink = aContact.ContactLink()->CloneLC();
       
   111     CPhCntVPbkContactId* contactId = 
       
   112         CPhCntVPbkContactId::NewL( contactLink, iContactManager );
       
   113     CleanupStack::Pop(); // contactLink
       
   114     aFieldInfo.iContactId = contactId;
       
   115         
       
   116     aFieldInfo.iThumbIndex = KErrNotFound;
       
   117 	TPhCntNumber speedDial = aContact.SpeedDialNumber( aSpeedDialPosition );    
   109 	TPhCntNumber speedDial = aContact.SpeedDialNumber( aSpeedDialPosition );    
   118 	aFieldInfo.iNumberType = speedDial.Type();
   110 	aFieldInfo.iNumberType = speedDial.Type();
   119     }
   111     }
   120 
   112 
   121 // ---------------------------------------------------------------------------
   113 // ---------------------------------------------------------------------------
   258         }    
   250         }    
   259     MVPbkContactLink *link = NULL;
   251     MVPbkContactLink *link = NULL;
   260     TInt err = iSpdDial->ShowAssign( aSpeedDialPosition, link );
   252     TInt err = iSpdDial->ShowAssign( aSpeedDialPosition, link );
   261     delete iSpdDial;
   253     delete iSpdDial;
   262     iSpdDial = NULL;
   254     iSpdDial = NULL;
       
   255     delete link;
       
   256     link = NULL;
       
   257     
   263     if ( err == KErrNone )
   258     if ( err == KErrNone )
   264         {
   259         {
   265         err = FetchNumberL( aSpeedDialPosition, aPhoneNumber );    
   260         err = FetchNumberL( aSpeedDialPosition, aPhoneNumber );    
   266         }
   261         }
   267     return err;
   262     return err;