author | zautrix <zautrix> | 2005-01-18 10:15:21 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-18 10:15:21 (UTC) |
commit | fbc1ca53388337b66017973896725d51416aae1a (patch) (unidiff) | |
tree | 436dd042c407dd994976c8e460d4c85d527799b7 | |
parent | f973a8310cc378cc86d96bfce3f08f06725a2b7d (diff) | |
download | kdepimpi-fbc1ca53388337b66017973896725d51416aae1a.zip kdepimpi-fbc1ca53388337b66017973896725d51416aae1a.tar.gz kdepimpi-fbc1ca53388337b66017973896725d51416aae1a.tar.bz2 |
fix
-rw-r--r-- | kabc/addressee.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 82b4b9b..bfcfab5 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -338,2 +338,21 @@ void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) | |||
338 | } | 338 | } |
339 | } else { | ||
340 | PhoneNumber::List phoneAD = ad.phoneNumbers(); | ||
341 | PhoneNumber::List::Iterator phoneItAD; | ||
342 | for ( phoneItAD = phoneAD.begin(); phoneItAD != phoneAD.end(); ++phoneItAD ) { | ||
343 | bool found = false; | ||
344 | PhoneNumber::List::Iterator it; | ||
345 | for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { | ||
346 | if ( ( *phoneItAD ).contains( (*it) ) ) { | ||
347 | found = true; | ||
348 | (*it).setType( ( *phoneItAD ).type() ); | ||
349 | (*it).setNumber( ( *phoneItAD ).number() ); | ||
350 | break; | ||
351 | } | ||
352 | } | ||
353 | if ( ! found ) { // append numbers which do not have work or home type | ||
354 | if ( ! ( ( *phoneItAD ).type() & (PhoneNumber::Work | PhoneNumber::Home) ) ) | ||
355 | mData->phoneNumbers.append( *phoneItAD ); | ||
356 | } | ||
357 | } | ||
339 | } | 358 | } |