summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.cpp
Side-by-side diff
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
@@ -86,25 +86,25 @@ struct Addressee::AddresseeData : public KShared
bool empty :1;
bool changed :1;
};
Addressee::Addressee()
{
mData = new AddresseeData;
mData->empty = true;
mData->changed = false;
mData->resource = 0;
mData->mExternalId = ":";
- mData->revision = QDateTime ( QDate( 2004,1,1));
+ mData->revision = QDateTime ( QDate( 2003,1,1));
mData->mTempSyncStat = SYNC_TEMPSTATE_INITIAL;
}
Addressee::~Addressee()
{
}
Addressee::Addressee( const Addressee &a )
{
mData = a.mData;
}
@@ -299,24 +299,26 @@ void Addressee::mergeContact( const Addressee& ad )
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
+ qDebug("merge contact %s ", ad.uid().latin1());
+ setUid( ad.uid() );
}
void Addressee::removeID(const QString &prof)
{
detach();
mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof);
}
void Addressee::setID( const QString & prof , const QString & id )
{
detach();
mData->mExternalId = KIdManager::setId ( mData->mExternalId, prof, id );
@@ -370,36 +372,38 @@ void Addressee::setExternalUID( const QString &id )
mData->externalUID = id;
}
QString Addressee::externalUID() const
{
return mData->externalUID;
}
void Addressee::setOriginalExternalUID( const QString &id )
{
if ( id == mData->originalExternalUID ) return;
detach();
mData->empty = false;
+ qDebug("*******Set orig uid %s ", id.latin1());
mData->originalExternalUID = id;
}
QString Addressee::originalExternalUID() const
{
return mData->originalExternalUID;
}
void Addressee::setUid( const QString &id )
{
if ( id == mData->uid ) return;
detach();
+ qDebug("****setuid %s ", id.latin1());
mData->empty = false;
mData->uid = id;
}
QString Addressee::uid() const
{
if ( mData->uid.isEmpty() )
mData->uid = KApplication::randomString( 10 );
return mData->uid;
}