author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/addressee.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kabc/addressee.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index e8e440c..9994e29 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -346,97 +346,97 @@ void Addressee::mergeOLContact( const Addressee& ad ) mData->sound = ad.mData->sound; } } if ( !mData->agent.isIntern() ) { if ( mData->agent.url().isEmpty() ) { mData->agent = ad.mData->agent; } } { Key::List::Iterator itA; for( itA = ad.mData->keys.begin(); itA != ad.mData->keys.end(); ++itA ) { bool found = false; Key::List::Iterator it; for( it = mData->keys.begin(); it != mData->keys.end(); ++it ) { if ( (*it) == (*itA)) { found = true; break; } } if ( ! found ) { mData->keys.append( *itA ); } } } KABC::Address addthis = otherAddress(); KABC::Address addother = ad.otherAddress(); if ( !addthis.isEmpty() && !addother.isEmpty() ) addthis.setType( addother.type() ); //qDebug("merge contact %s ", ad.uid().latin1()); setUid( ad.uid() ); setRevision( ad.revision() ); } void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) { // merge all standard non-outlook fields. //if isSubSet (e.g. mobile phone sync) merge all fields detach(); if ( isSubSet ) { if ( mData->name.isEmpty() ) mData->name = ad.mData->name; if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName; if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; - if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; + if ( mData->additionalName.isEmpty() ) mData->additionalName = ad.mData->additionalName; if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; if ( mData->title .isEmpty() ) mData->title = ad.mData->title ; if ( mData->role.isEmpty() ) mData->role = ad.mData->role ; if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ; if ( mData->note.isEmpty() ) mData->note = ad.mData->note ; if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy; if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ; if ( !mData->birthday.isValid() ) if ( ad.mData->birthday.isValid()) mData->birthday = ad.mData->birthday; } if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; if ( !mData->timeZone.isValid() ) mData->timeZone = ad.mData->timeZone; if ( !mData->geo.isValid() ) mData->geo = ad.mData->geo; if ( mData->productId.isEmpty() ) mData->productId = ad.mData->productId; if ( mData->sortString.isEmpty() ) mData->sortString = ad.mData->sortString; QStringList t; QStringList tAD; uint iii; // ********** phone numbers if ( isSubSet ) { PhoneNumber::List phoneAD = ad.phoneNumbers(); PhoneNumber::List::Iterator phoneItAD; for ( phoneItAD = phoneAD.begin(); phoneItAD != phoneAD.end(); ++phoneItAD ) { bool found = false; PhoneNumber::List::Iterator it; for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { if ( ( *phoneItAD ).contains( (*it) ) ) { found = true; (*it).setType( ( *phoneItAD ).type() ); (*it).setNumber( ( *phoneItAD ).number() ); break; } } // if ( isSubSet && ! found ) if ( ! found ) // LR try this one... mData->phoneNumbers.append( *phoneItAD ); } } else { PhoneNumber::List phoneAD = ad.phoneNumbers(); PhoneNumber::List::Iterator phoneItAD; for ( phoneItAD = phoneAD.begin(); phoneItAD != phoneAD.end(); ++phoneItAD ) { bool found = false; PhoneNumber::List::Iterator it; |