summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.cpp
Unidiff
Diffstat (limited to 'kabc/addressee.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index fda62f1..e241281 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -90,17 +90,17 @@ struct Addressee::AddresseeData : public KShared
90 90
91Addressee::Addressee() 91Addressee::Addressee()
92{ 92{
93 mData = new AddresseeData; 93 mData = new AddresseeData;
94 mData->empty = true; 94 mData->empty = true;
95 mData->changed = false; 95 mData->changed = false;
96 mData->resource = 0; 96 mData->resource = 0;
97 mData->mExternalId = ":"; 97 mData->mExternalId = ":";
98 mData->revision = QDateTime ( QDate( 2004,1,1)); 98 mData->revision = QDateTime ( QDate( 2003,1,1));
99 mData->mTempSyncStat = SYNC_TEMPSTATE_INITIAL; 99 mData->mTempSyncStat = SYNC_TEMPSTATE_INITIAL;
100} 100}
101 101
102Addressee::~Addressee() 102Addressee::~Addressee()
103{ 103{
104} 104}
105 105
106Addressee::Addressee( const Addressee &a ) 106Addressee::Addressee( const Addressee &a )
@@ -303,16 +303,18 @@ void Addressee::mergeContact( const Addressee& ad )
303 303
304 // pending: 304 // pending:
305 // merging phonenumbers 305 // merging phonenumbers
306 // merging addresses 306 // merging addresses
307 // merging emails; 307 // merging emails;
308 // merging categories; 308 // merging categories;
309 // merging custom; 309 // merging custom;
310 // merging keys 310 // merging keys
311 qDebug("merge contact %s ", ad.uid().latin1());
312 setUid( ad.uid() );
311} 313}
312 314
313void Addressee::removeID(const QString &prof) 315void Addressee::removeID(const QString &prof)
314{ 316{
315 detach(); 317 detach();
316 mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); 318 mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof);
317 319
318} 320}
@@ -374,28 +376,30 @@ QString Addressee::externalUID() const
374{ 376{
375 return mData->externalUID; 377 return mData->externalUID;
376} 378}
377void Addressee::setOriginalExternalUID( const QString &id ) 379void Addressee::setOriginalExternalUID( const QString &id )
378{ 380{
379 if ( id == mData->originalExternalUID ) return; 381 if ( id == mData->originalExternalUID ) return;
380 detach(); 382 detach();
381 mData->empty = false; 383 mData->empty = false;
384 qDebug("*******Set orig uid %s ", id.latin1());
382 mData->originalExternalUID = id; 385 mData->originalExternalUID = id;
383} 386}
384 387
385QString Addressee::originalExternalUID() const 388QString Addressee::originalExternalUID() const
386{ 389{
387 return mData->originalExternalUID; 390 return mData->originalExternalUID;
388} 391}
389 392
390void Addressee::setUid( const QString &id ) 393void Addressee::setUid( const QString &id )
391{ 394{
392 if ( id == mData->uid ) return; 395 if ( id == mData->uid ) return;
393 detach(); 396 detach();
397 qDebug("****setuid %s ", id.latin1());
394 mData->empty = false; 398 mData->empty = false;
395 mData->uid = id; 399 mData->uid = id;
396} 400}
397 401
398QString Addressee::uid() const 402QString Addressee::uid() const
399{ 403{
400 if ( mData->uid.isEmpty() ) 404 if ( mData->uid.isEmpty() )
401 mData->uid = KApplication::randomString( 10 ); 405 mData->uid = KApplication::randomString( 10 );