summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Unidiff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/addressbook.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index f9e4387..fe59fcb 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -946,6 +946,23 @@ void AddressBook::preExternSync( AddressBook* aBook, const QString& csd , bool i
946 } 946 }
947 mergeAB( aBook ,csd, isSubset ); 947 mergeAB( aBook ,csd, isSubset );
948} 948}
949void AddressBook::preOLSync( AddressBook* aBook, const QString& csd )
950{
951 //qDebug("AddressBook::preExternSync ");
952 AddressBook::Iterator it;
953 for ( it = begin(); it != end(); ++it ) {
954 (*it).setID( csd, (*it).externalUID() );
955 (*it).computeCsum( csd );
956 }
957
958 Addressee ad;
959 for ( it = begin(); it != end(); ++it ) {
960 ad = aBook->findByExternUid( (*it).externalUID(), csd );
961 if ( !ad.isEmpty() ) {
962 (*it).mergeOLContact( ad );
963 }
964 }
965}
949void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool setID) 966void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool setID)
950{ 967{
951 //qDebug("AddressBook::postExternSync "); 968 //qDebug("AddressBook::postExternSync ");
@@ -965,7 +982,8 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool
965 (*it).setIDStr(":"); 982 (*it).setIDStr(":");
966 if ( setID ) { 983 if ( setID ) {
967 if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) 984 if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_ID )
968 ad.setID( csd, (*it).externalUID() ); 985 ad.setID( csd, (*it).externalUID() );{
986 }
969 } else 987 } else
970 ad.setID( csd, (*it).uid() ); 988 ad.setID( csd, (*it).uid() );
971 (*it).computeCsum( csd ); 989 (*it).computeCsum( csd );