summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
authorzautrix <zautrix>2004-10-13 13:18:51 (UTC)
committer zautrix <zautrix>2004-10-13 13:18:51 (UTC)
commitd41893fb0a49fbb080326a4c1fd98e1a032a182a (patch) (unidiff)
tree9b95603ff93801accaa94de4b73d88ea9c5c9386 /kabc/addressbook.cpp
parentefdd0735bda81dcd82dfb6d6dc0d0c143f249336 (diff)
downloadkdepimpi-d41893fb0a49fbb080326a4c1fd98e1a032a182a.zip
kdepimpi-d41893fb0a49fbb080326a4c1fd98e1a032a182a.tar.gz
kdepimpi-d41893fb0a49fbb080326a4c1fd98e1a032a182a.tar.bz2
merge contact fixes
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 19c26eb..8882259 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -860,21 +860,21 @@ Addressee AddressBook::findByUid( const QString &uid )
860 if ( uid == (*it).uid() ) { 860 if ( uid == (*it).uid() ) {
861 return *it; 861 return *it;
862 } 862 }
863 } 863 }
864 return Addressee(); 864 return Addressee();
865} 865}
866void AddressBook::preExternSync( AddressBook* aBook, const QString& csd ) 866void AddressBook::preExternSync( AddressBook* aBook, const QString& csd , bool isSubset )
867{ 867{
868 //qDebug("AddressBook::preExternSync "); 868 //qDebug("AddressBook::preExternSync ");
869 AddressBook::Iterator it; 869 AddressBook::Iterator it;
870 for ( it = begin(); it != end(); ++it ) { 870 for ( it = begin(); it != end(); ++it ) {
871 (*it).setID( csd, (*it).externalUID() ); 871 (*it).setID( csd, (*it).externalUID() );
872 (*it).computeCsum( csd ); 872 (*it).computeCsum( csd );
873 } 873 }
874 mergeAB( aBook ,csd ); 874 mergeAB( aBook ,csd, isSubset );
875} 875}
876void AddressBook::postExternSync( AddressBook* aBook , const QString& csd) 876void AddressBook::postExternSync( AddressBook* aBook , const QString& csd)
877{ 877{
878 //qDebug("AddressBook::postExternSync "); 878 //qDebug("AddressBook::postExternSync ");
879 AddressBook::Iterator it; 879 AddressBook::Iterator it;
880 for ( it = begin(); it != end(); ++it ) { 880 for ( it = begin(); it != end(); ++it ) {
@@ -910,20 +910,20 @@ Addressee AddressBook::findByExternUid( const QString& uid , const QString& pr
910 for ( it = begin(); it != end(); ++it ) { 910 for ( it = begin(); it != end(); ++it ) {
911 if ( uid == (*it).getID( profile ) ) 911 if ( uid == (*it).getID( profile ) )
912 return (*it); 912 return (*it);
913 } 913 }
914 return Addressee(); 914 return Addressee();
915} 915}
916void AddressBook::mergeAB( AddressBook *aBook, const QString& profile ) 916void AddressBook::mergeAB( AddressBook *aBook, const QString& profile , bool isSubset )
917{ 917{
918 Iterator it; 918 Iterator it;
919 Addressee ad; 919 Addressee ad;
920 for ( it = begin(); it != end(); ++it ) { 920 for ( it = begin(); it != end(); ++it ) {
921 ad = aBook->findByExternUid( (*it).externalUID(), profile ); 921 ad = aBook->findByExternUid( (*it).externalUID(), profile );
922 if ( !ad.isEmpty() ) { 922 if ( !ad.isEmpty() ) {
923 (*it).mergeContact( ad ); 923 (*it).mergeContact( ad ,isSubset);
924 } 924 }
925 } 925 }
926#if 0 926#if 0
927 // test only 927 // test only
928 for ( it = begin(); it != end(); ++it ) { 928 for ( it = begin(); it != end(); ++it ) {
929 929