author | zautrix <zautrix> | 2004-09-19 12:24:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-19 12:24:31 (UTC) |
commit | e0d8e062c9d8092e47dcadd88b30614ebff43c0c (patch) (side-by-side diff) | |
tree | 0a44246ce5e974c8db55ff84a03afb50abaf5d0d /kabc/addressee.cpp | |
parent | 5a78d90ce7a9824e52e70f40f41aa6e17f0d3d0d (diff) | |
download | kdepimpi-e0d8e062c9d8092e47dcadd88b30614ebff43c0c.zip kdepimpi-e0d8e062c9d8092e47dcadd88b30614ebff43c0c.tar.gz kdepimpi-e0d8e062c9d8092e47dcadd88b30614ebff43c0c.tar.bz2 |
more AB sync
-rw-r--r-- | kabc/addressee.cpp | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 0157721..3a2dc5f 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -141,17 +141,17 @@ bool Addressee::operator==( const Addressee &a ) const if ( mData->mailer != a.mData->mailer ) return false; if ( mData->timeZone != a.mData->timeZone ) return false; if ( mData->geo != a.mData->geo ) return false; if ( mData->title != a.mData->title ) return false; if ( mData->role != a.mData->role ) return false; if ( mData->organization != a.mData->organization ) return false; if ( mData->note != a.mData->note ) return false; if ( mData->productId != a.mData->productId ) return false; - if ( mData->revision != a.mData->revision ) return false; + //if ( mData->revision != a.mData->revision ) return false; if ( mData->sortString != a.mData->sortString ) return false; if ( mData->secrecy != a.mData->secrecy ) return false; if ( mData->logo != a.mData->logo ) return false; if ( mData->photo != a.mData->photo ) return false; if ( mData->sound != a.mData->sound ) return false; if ( mData->agent != a.mData->agent ) return false; if ( ( mData->url.isValid() || a.mData->url.isValid() ) && ( mData->url != a.mData->url ) ) return false; @@ -284,27 +284,34 @@ void Addressee::mergeContact( const Addressee& ad ) if ( mData->additionalName ) 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->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; if ( !mData->birthday.isValid() ) if ( ad.mData->birthday.isValid()) mData->birthday = ad.mData->birthday; if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; -#if 0 - if ( !mData->timeZone.isValid() ) l.append( mData->timeZone.asString() ); - if ( mData->geo.isValid() ) l.append( mData->geo.asString() ); - if ( !mData->title .isEmpty() ) l.append( mData->title ); - if ( !mData->role.isEmpty() ) l.append( mData->role ); - if ( !mData->organization.isEmpty() ) l.append( mData->organization ); - if ( !mData->note.isEmpty() ) l.append( mData->note ); - if ( !mData->productId.isEmpty() ) l.append(mData->productId ); - if ( !mData->sortString.isEmpty() ) l.append( mData->sortString ); - if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString()); -#endif + if ( !mData->timeZone.isValid() ) mData->timeZone = ad.mData->timeZone; + if ( !mData->geo.isValid() ) mData->geo = ad.mData->geo; + if ( mData->title .isEmpty() ) mData->title = ad.mData->title ; + if ( mData->role.isEmpty() ) mData->role = ad.mData->role ; + if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ; + if ( mData->note.isEmpty() ) mData->note = ad.mData->note ; + if ( mData->productId.isEmpty() ) mData->productId = ad.mData->productId; + if ( mData->sortString.isEmpty() ) mData->sortString = ad.mData->sortString; + if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy; + if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ; + + // pending: + // merging phonenumbers + // merging addresses + // merging emails; + // merging categories; + // merging custom; + // merging keys } void Addressee::removeID(const QString &prof) { detach(); mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); } |