-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 | |||
@@ -362,65 +362,65 @@ void Addressee::mergeOLContact( const Addressee& ad ) | |||
362 | break; | 362 | break; |
363 | 363 | ||
364 | } | 364 | } |
365 | } | 365 | } |
366 | if ( ! found ) { | 366 | if ( ! found ) { |
367 | mData->keys.append( *itA ); | 367 | mData->keys.append( *itA ); |
368 | } | 368 | } |
369 | } | 369 | } |
370 | } | 370 | } |
371 | 371 | ||
372 | KABC::Address addthis = otherAddress(); | 372 | KABC::Address addthis = otherAddress(); |
373 | KABC::Address addother = ad.otherAddress(); | 373 | KABC::Address addother = ad.otherAddress(); |
374 | if ( !addthis.isEmpty() && !addother.isEmpty() ) | 374 | if ( !addthis.isEmpty() && !addother.isEmpty() ) |
375 | addthis.setType( addother.type() ); | 375 | addthis.setType( addother.type() ); |
376 | //qDebug("merge contact %s ", ad.uid().latin1()); | 376 | //qDebug("merge contact %s ", ad.uid().latin1()); |
377 | setUid( ad.uid() ); | 377 | setUid( ad.uid() ); |
378 | setRevision( ad.revision() ); | 378 | setRevision( ad.revision() ); |
379 | 379 | ||
380 | 380 | ||
381 | } | 381 | } |
382 | 382 | ||
383 | void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) | 383 | void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) |
384 | { | 384 | { |
385 | // merge all standard non-outlook fields. | 385 | // merge all standard non-outlook fields. |
386 | //if isSubSet (e.g. mobile phone sync) merge all fields | 386 | //if isSubSet (e.g. mobile phone sync) merge all fields |
387 | 387 | ||
388 | detach(); | 388 | detach(); |
389 | if ( isSubSet ) { | 389 | if ( isSubSet ) { |
390 | if ( mData->name.isEmpty() ) mData->name = ad.mData->name; | 390 | if ( mData->name.isEmpty() ) mData->name = ad.mData->name; |
391 | if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName; | 391 | if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName; |
392 | if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; | 392 | if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; |
393 | if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; | 393 | if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; |
394 | if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; | 394 | if ( mData->additionalName.isEmpty() ) mData->additionalName = ad.mData->additionalName; |
395 | if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; | 395 | if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; |
396 | if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; | 396 | if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; |
397 | if ( mData->title .isEmpty() ) mData->title = ad.mData->title ; | 397 | if ( mData->title .isEmpty() ) mData->title = ad.mData->title ; |
398 | if ( mData->role.isEmpty() ) mData->role = ad.mData->role ; | 398 | if ( mData->role.isEmpty() ) mData->role = ad.mData->role ; |
399 | if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; | 399 | if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; |
400 | if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ; | 400 | if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ; |
401 | if ( mData->note.isEmpty() ) mData->note = ad.mData->note ; | 401 | if ( mData->note.isEmpty() ) mData->note = ad.mData->note ; |
402 | if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy; | 402 | if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy; |
403 | if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ; | 403 | if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ; |
404 | if ( !mData->birthday.isValid() ) | 404 | if ( !mData->birthday.isValid() ) |
405 | if ( ad.mData->birthday.isValid()) | 405 | if ( ad.mData->birthday.isValid()) |
406 | mData->birthday = ad.mData->birthday; | 406 | mData->birthday = ad.mData->birthday; |
407 | 407 | ||
408 | } | 408 | } |
409 | if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; | 409 | if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; |
410 | if ( !mData->timeZone.isValid() ) mData->timeZone = ad.mData->timeZone; | 410 | if ( !mData->timeZone.isValid() ) mData->timeZone = ad.mData->timeZone; |
411 | if ( !mData->geo.isValid() ) mData->geo = ad.mData->geo; | 411 | if ( !mData->geo.isValid() ) mData->geo = ad.mData->geo; |
412 | if ( mData->productId.isEmpty() ) mData->productId = ad.mData->productId; | 412 | if ( mData->productId.isEmpty() ) mData->productId = ad.mData->productId; |
413 | if ( mData->sortString.isEmpty() ) mData->sortString = ad.mData->sortString; | 413 | if ( mData->sortString.isEmpty() ) mData->sortString = ad.mData->sortString; |
414 | QStringList t; | 414 | QStringList t; |
415 | QStringList tAD; | 415 | QStringList tAD; |
416 | uint iii; | 416 | uint iii; |
417 | 417 | ||
418 | // ********** phone numbers | 418 | // ********** phone numbers |
419 | if ( isSubSet ) { | 419 | if ( isSubSet ) { |
420 | PhoneNumber::List phoneAD = ad.phoneNumbers(); | 420 | PhoneNumber::List phoneAD = ad.phoneNumbers(); |
421 | PhoneNumber::List::Iterator phoneItAD; | 421 | PhoneNumber::List::Iterator phoneItAD; |
422 | for ( phoneItAD = phoneAD.begin(); phoneItAD != phoneAD.end(); ++phoneItAD ) { | 422 | for ( phoneItAD = phoneAD.begin(); phoneItAD != phoneAD.end(); ++phoneItAD ) { |
423 | bool found = false; | 423 | bool found = false; |
424 | PhoneNumber::List::Iterator it; | 424 | PhoneNumber::List::Iterator it; |
425 | for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { | 425 | for( it = mData->phoneNumbers.begin(); it != mData->phoneNumbers.end(); ++it ) { |
426 | if ( ( *phoneItAD ).contains( (*it) ) ) { | 426 | if ( ( *phoneItAD ).contains( (*it) ) ) { |