summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Unidiff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 4de7da2..9e61261 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -939,51 +939,51 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd, bool
939 } else 939 } else
940 ad.setID( csd, (*it).uid() ); 940 ad.setID( csd, (*it).uid() );
941 (*it).computeCsum( csd ); 941 (*it).computeCsum( csd );
942 ad.setCsum( csd, (*it).getCsum( csd ) ); 942 ad.setCsum( csd, (*it).getCsum( csd ) );
943 //qDebug("CSUM %s ",(*it).getCsum( csd ).latin1() ); 943 //qDebug("CSUM %s ",(*it).getCsum( csd ).latin1() );
944 aBook->insertAddressee( ad , false); 944 aBook->insertAddressee( ad , false);
945 } 945 }
946 } 946 }
947 } 947 }
948 if ( foundEmpty ) { 948 if ( foundEmpty ) {
949 qDebug("postExternSync:%d empty addressees found:\n probably filtered out by incoming sync filter.",foundEmpty ); 949 qDebug("postExternSync:%d empty addressees found:\n probably filtered out by incoming sync filter.",foundEmpty );
950 } 950 }
951 951
952} 952}
953 953
954bool AddressBook::containsExternalUid( const QString& uid ) 954bool AddressBook::containsExternalUid( const QString& uid )
955{ 955{
956 Iterator it; 956 Iterator it;
957 for ( it = begin(); it != end(); ++it ) { 957 for ( it = begin(); it != end(); ++it ) {
958 if ( uid == (*it).externalUID( ) ) 958 if ( uid == (*it).externalUID( ) )
959 return true; 959 return true;
960 } 960 }
961 return false; 961 return false;
962} 962}
963Addressee AddressBook::findByExternUid( const QString& uid , const QString& profile ) 963const Addressee AddressBook::findByExternUid( const QString& uid , const QString& profile ) const
964{ 964{
965 Iterator it; 965 ConstIterator it;
966 for ( it = begin(); it != end(); ++it ) { 966 for ( it = begin(); it != end(); ++it ) {
967 if ( uid == (*it).getID( profile ) ) 967 if ( uid == (*it).getID( profile ) )
968 return (*it); 968 return (*it);
969 } 969 }
970 return Addressee(); 970 return Addressee();
971} 971}
972void AddressBook::mergeAB( AddressBook *aBook, const QString& profile , bool isSubset ) 972void AddressBook::mergeAB( AddressBook *aBook, const QString& profile , bool isSubset )
973{ 973{
974 Iterator it; 974 Iterator it;
975 Addressee ad; 975 Addressee ad;
976 for ( it = begin(); it != end(); ++it ) { 976 for ( it = begin(); it != end(); ++it ) {
977 ad = aBook->findByExternUid( (*it).externalUID(), profile ); 977 ad = aBook->findByExternUid( (*it).externalUID(), profile );
978 if ( !ad.isEmpty() ) { 978 if ( !ad.isEmpty() ) {
979 (*it).mergeContact( ad ,isSubset); 979 (*it).mergeContact( ad ,isSubset);
980 } 980 }
981 } 981 }
982#if 0 982#if 0
983 // test only 983 // test only
984 for ( it = begin(); it != end(); ++it ) { 984 for ( it = begin(); it != end(); ++it ) {
985 985
986 qDebug("uid %s ", (*it).uid().latin1()); 986 qDebug("uid %s ", (*it).uid().latin1());
987 } 987 }
988#endif 988#endif
989} 989}