qtmobility/plugins/contacts/symbian/src/transform/cnttransformaddress.cpp
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
   104         }
   104         }
   105     }
   105     }
   106 
   106 
   107     // Find existing address details from contact
   107     // Find existing address details from contact
   108     QContactDetail* detail = 0;
   108     QContactDetail* detail = 0;
   109     foreach( QContactAddress existingAddress, contact.details<QContactAddress>() )
   109     foreach(const QContactAddress& existingAddress, contact.details<QContactAddress>() )
   110     {
   110     {
   111         // Do not merge if contexts don't match
   111         // Do not merge if contexts don't match
   112         if( existingAddress.contexts() != address.contexts() )
   112         if( existingAddress.contexts() != address.contexts() )
   113             continue;
   113             continue;
   114 
   114 
   115         // Merge detail with existing detail
   115         // Merge detail with existing detail
   116         detail = new QContactAddress( existingAddress );
   116         detail = new QContactAddress( existingAddress );
   117         foreach( QString key, address.variantValues().keys() )
   117         foreach(const QString& key, address.variantValues().keys() )
   118             detail->setValue( key, address.variantValue(key) );
   118             detail->setValue( key, address.variantValue(key) );
   119         break;
   119         break;
   120     }
   120     }
   121 
   121 
   122     // Create a new address detail if not merging
   122     // Create a new address detail if not merging