summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.cpp
Unidiff
Diffstat (limited to 'kabc/addressee.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index c34f671..711c261 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -67,4 +67,5 @@ struct Addressee::AddresseeData : public KShared
67 QDateTime revision; 67 QDateTime revision;
68 QString sortString; 68 QString sortString;
69 QString externalUID;
69 KURL url; 70 KURL url;
70 Secrecy secrecy; 71 Secrecy secrecy;
@@ -272,4 +273,30 @@ void Addressee::computeCsum(const QString &dev)
272 setCsum( dev, QString::number (cs )); 273 setCsum( dev, QString::number (cs ));
273} 274}
275
276void Addressee::mergeContact( Addressee ad )
277{
278#if 0
279 if ( !mData->name.isEmpty() ) l.append(mData->name);
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() );
291 if ( !mData->title .isEmpty() ) l.append( mData->title );
292 if ( !mData->role.isEmpty() ) l.append( mData->role );
293 if ( !mData->organization.isEmpty() ) l.append( mData->organization );
294 if ( !mData->note.isEmpty() ) l.append( mData->note );
295 if ( !mData->productId.isEmpty() ) l.append(mData->productId );
296 if ( !mData->sortString.isEmpty() ) l.append( mData->sortString );
297 if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString());
298#endif
299}
300
274void Addressee::removeID(const QString &prof) 301void Addressee::removeID(const QString &prof)
275{ 302{
@@ -324,4 +351,16 @@ QString Addressee::IDStr() const
324} 351}
325 352
353void Addressee::setExternalUID( const QString &id )
354{
355 if ( id == mData->externalUID ) return;
356 detach();
357 mData->empty = false;
358 mData->externalUID = id;
359}
360
361QString Addressee::externalUID() const
362{
363 return mData->externalUID;
364}
326 365
327void Addressee::setUid( const QString &id ) 366void Addressee::setUid( const QString &id )