author | zautrix <zautrix> | 2004-10-27 19:44:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-27 19:44:10 (UTC) |
commit | bb82cac85cc196b3f60921ab27e84204036b54b8 (patch) (side-by-side diff) | |
tree | 518629480b983b6b85a4cf1e5542f94fe1687e41 /kabc | |
parent | 85a0e0d9b1d60805cb4947be1c296c18e73c82b8 (diff) | |
download | kdepimpi-bb82cac85cc196b3f60921ab27e84204036b54b8.zip kdepimpi-bb82cac85cc196b3f60921ab27e84204036b54b8.tar.gz kdepimpi-bb82cac85cc196b3f60921ab27e84204036b54b8.tar.bz2 |
sync fixes
-rw-r--r-- | kabc/addressbook.cpp | 13 | ||||
-rw-r--r-- | kabc/addressbook.h | 2 | ||||
-rw-r--r-- | kabc/addressee.cpp | 0 |
3 files changed, 13 insertions, 2 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 9b196b5..5774c36 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -876,2 +876,9 @@ void AddressBook::removeSyncAddressees( bool removeDeleted ) //qDebug("skipping %s ",(*it).uid().latin1() ); + if ( removeDeleted ) { + // we have no postprocessing in the resource, we have to do it here + // we have to compute csum for all, because it could be the first sync + (*it).setTempSyncStat( SYNC_TEMPSTATE_NEW_CSUM ); + + + } ++it; @@ -919,3 +926,3 @@ void AddressBook::preExternSync( AddressBook* aBook, const QString& csd , bool i } -void AddressBook::postExternSync( AddressBook* aBook , const QString& csd) +void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool setID) { @@ -931,5 +938,9 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd) } else { + (*it).setIDStr(":"); (*it).computeCsum( csd ); + if ( setID ) { if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) ad.setID( csd, (*it).externalUID() ); + } else + ad.setID( csd, "_" ); ad.setCsum( csd, (*it).getCsum( csd ) ); diff --git a/kabc/addressbook.h b/kabc/addressbook.h index f124dc9..75f8b51 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h @@ -309,3 +309,3 @@ class AddressBook : public QObject void preExternSync( AddressBook* aBook, const QString& csd, bool isSubset ); - void postExternSync( AddressBook* aBook, const QString& csd ); + void postExternSync( AddressBook* aBook, const QString& csd , bool setID ); signals: diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index a660a9d..d5a110a 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp |