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.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 31ce1d6..25c77f6 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -291,48 +291,49 @@ void Addressee::mergeContact( const Addressee& ad )
if ( !mData->birthday.isValid() )
if ( ad.mData->birthday.isValid())
mData->birthday = ad.mData->birthday;
if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer;
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
qDebug("merge contact %s ", ad.uid().latin1());
setUid( ad.uid() );
+ setRevision( ad.revision() );
}
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 );
//qDebug("setID2 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() );
}
void Addressee::setTempSyncStat( int id )
{
if ( mData->mTempSyncStat == id ) return;
detach();
mData->mTempSyncStat = id;
}
int Addressee::tempSyncStat() const
{
return mData->mTempSyncStat;
}