author | zautrix <zautrix> | 2004-09-19 11:44:45 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-19 11:44:45 (UTC) |
commit | 5a78d90ce7a9824e52e70f40f41aa6e17f0d3d0d (patch) (unidiff) | |
tree | 45ccbce00f69f5bb75878b4cbb0ffa38260628d4 | |
parent | eea0ff04703dffdbe8b67a0dc9f592597d7450c1 (diff) | |
download | kdepimpi-5a78d90ce7a9824e52e70f40f41aa6e17f0d3d0d.zip kdepimpi-5a78d90ce7a9824e52e70f40f41aa6e17f0d3d0d.tar.gz kdepimpi-5a78d90ce7a9824e52e70f40f41aa6e17f0d3d0d.tar.bz2 |
more AB sync
-rw-r--r-- | kabc/addressee.cpp | 28 | ||||
-rw-r--r-- | kabc/addressee.h | 2 |
2 files changed, 17 insertions, 13 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 711c261..0157721 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -275,16 +275,20 @@ void Addressee::computeCsum(const QString &dev) | |||
275 | 275 | ||
276 | void Addressee::mergeContact( Addressee ad ) | 276 | void Addressee::mergeContact( const Addressee& ad ) |
277 | { | 277 | { |
278 | |||
279 | detach(); | ||
280 | if ( mData->name.isEmpty() ) mData->name = ad.mData->name; | ||
281 | if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName; | ||
282 | if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; | ||
283 | if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; | ||
284 | if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; | ||
285 | if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; | ||
286 | if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; | ||
287 | if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; | ||
288 | if ( !mData->birthday.isValid() ) | ||
289 | if ( ad.mData->birthday.isValid()) | ||
290 | mData->birthday = ad.mData->birthday; | ||
291 | if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; | ||
278 | #if 0 | 292 | #if 0 |
279 | if ( !mData->name.isEmpty() ) l.append(mData->name); | 293 | if ( !mData->timeZone.isValid() ) l.append( mData->timeZone.asString() ); |
280 | if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName ); | ||
281 | if ( !mData->familyName.isEmpty() ) l.append( mData->familyName ); | ||
282 | if ( !mData->givenName.isEmpty() ) l.append(mData->givenName ); | ||
283 | if ( !mData->additionalName ) l.append( mData->additionalName ); | ||
284 | if ( !mData->prefix.isEmpty() ) l.append( mData->prefix ); | ||
285 | if ( !mData->suffix.isEmpty() ) l.append( mData->suffix ); | ||
286 | if ( !mData->nickName.isEmpty() ) l.append( mData->nickName ); | ||
287 | if ( mData->birthday.isValid() ) l.append( mData->birthday.toString() ); | ||
288 | if ( !mData->mailer.isEmpty() ) l.append( mData->mailer ); | ||
289 | if ( mData->timeZone.isValid() ) l.append( mData->timeZone.asString() ); | ||
290 | if ( mData->geo.isValid() ) l.append( mData->geo.asString() ); | 294 | if ( mData->geo.isValid() ) l.append( mData->geo.asString() ); |
diff --git a/kabc/addressee.h b/kabc/addressee.h index 59fcbd8..3ba7777 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h | |||
@@ -116,3 +116,3 @@ class Addressee | |||
116 | QString externalUID() const; | 116 | QString externalUID() const; |
117 | void mergeContact( Addressee ad ); | 117 | void mergeContact( const Addressee& ad ); |
118 | /** | 118 | /** |