summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-19 12:24:31 (UTC)
committer zautrix <zautrix>2004-09-19 12:24:31 (UTC)
commite0d8e062c9d8092e47dcadd88b30614ebff43c0c (patch) (unidiff)
tree0a44246ce5e974c8db55ff84a03afb50abaf5d0d
parent5a78d90ce7a9824e52e70f40f41aa6e17f0d3d0d (diff)
downloadkdepimpi-e0d8e062c9d8092e47dcadd88b30614ebff43c0c.zip
kdepimpi-e0d8e062c9d8092e47dcadd88b30614ebff43c0c.tar.gz
kdepimpi-e0d8e062c9d8092e47dcadd88b30614ebff43c0c.tar.bz2
more AB sync
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp31
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
@@ -143,13 +143,13 @@ bool Addressee::operator==( const Addressee &a ) const
143 if ( mData->geo != a.mData->geo ) return false; 143 if ( mData->geo != a.mData->geo ) return false;
144 if ( mData->title != a.mData->title ) return false; 144 if ( mData->title != a.mData->title ) return false;
145 if ( mData->role != a.mData->role ) return false; 145 if ( mData->role != a.mData->role ) return false;
146 if ( mData->organization != a.mData->organization ) return false; 146 if ( mData->organization != a.mData->organization ) return false;
147 if ( mData->note != a.mData->note ) return false; 147 if ( mData->note != a.mData->note ) return false;
148 if ( mData->productId != a.mData->productId ) return false; 148 if ( mData->productId != a.mData->productId ) return false;
149 if ( mData->revision != a.mData->revision ) return false; 149 //if ( mData->revision != a.mData->revision ) return false;
150 if ( mData->sortString != a.mData->sortString ) return false; 150 if ( mData->sortString != a.mData->sortString ) return false;
151 if ( mData->secrecy != a.mData->secrecy ) return false; 151 if ( mData->secrecy != a.mData->secrecy ) return false;
152 if ( mData->logo != a.mData->logo ) return false; 152 if ( mData->logo != a.mData->logo ) return false;
153 if ( mData->photo != a.mData->photo ) return false; 153 if ( mData->photo != a.mData->photo ) return false;
154 if ( mData->sound != a.mData->sound ) return false; 154 if ( mData->sound != a.mData->sound ) return false;
155 if ( mData->agent != a.mData->agent ) return false; 155 if ( mData->agent != a.mData->agent ) return false;
@@ -286,23 +286,30 @@ void Addressee::mergeContact( const Addressee& ad )
286 if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; 286 if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix;
287 if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; 287 if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName;
288 if ( !mData->birthday.isValid() ) 288 if ( !mData->birthday.isValid() )
289 if ( ad.mData->birthday.isValid()) 289 if ( ad.mData->birthday.isValid())
290 mData->birthday = ad.mData->birthday; 290 mData->birthday = ad.mData->birthday;
291 if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; 291 if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer;
292#if 0 292 if ( !mData->timeZone.isValid() ) mData->timeZone = ad.mData->timeZone;
293 if ( !mData->timeZone.isValid() ) l.append( mData->timeZone.asString() ); 293 if ( !mData->geo.isValid() ) mData->geo = ad.mData->geo;
294 if ( mData->geo.isValid() ) l.append( mData->geo.asString() ); 294 if ( mData->title .isEmpty() ) mData->title = ad.mData->title ;
295 if ( !mData->title .isEmpty() ) l.append( mData->title ); 295 if ( mData->role.isEmpty() ) mData->role = ad.mData->role ;
296 if ( !mData->role.isEmpty() ) l.append( mData->role ); 296 if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ;
297 if ( !mData->organization.isEmpty() ) l.append( mData->organization ); 297 if ( mData->note.isEmpty() ) mData->note = ad.mData->note ;
298 if ( !mData->note.isEmpty() ) l.append( mData->note ); 298 if ( mData->productId.isEmpty() ) mData->productId = ad.mData->productId;
299 if ( !mData->productId.isEmpty() ) l.append(mData->productId ); 299 if ( mData->sortString.isEmpty() ) mData->sortString = ad.mData->sortString;
300 if ( !mData->sortString.isEmpty() ) l.append( mData->sortString ); 300 if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy;
301 if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString()); 301 if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ;
302#endif 302
303 // pending:
304 // merging phonenumbers
305 // merging addresses
306 // merging emails;
307 // merging categories;
308 // merging custom;
309 // merging keys
303} 310}
304 311
305void Addressee::removeID(const QString &prof) 312void Addressee::removeID(const QString &prof)
306{ 313{
307 detach(); 314 detach();
308 mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); 315 mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof);