-rw-r--r-- | kabc/addressbook.cpp | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 86dc7c2..17b9ba2 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp | |||
@@ -554,5 +554,4 @@ void AddressBook::removeAddressee( const Addressee &a ) | |||
554 | 554 | ||
555 | void AddressBook::removeDeletedAddressees() | 555 | void AddressBook::removeSyncAddressees( bool removeDeleted ) |
556 | { | 556 | { |
557 | deleteRemovedAddressees(); | ||
558 | Iterator it = begin(); | 557 | Iterator it = begin(); |
@@ -564,3 +563,3 @@ void AddressBook::removeDeletedAddressees() | |||
564 | (*it).setIDStr(""); | 563 | (*it).setIDStr(""); |
565 | if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_DELETE || (*it).uid().left( 19 ) == QString("last-syncAddressee-")) { | 564 | if ( ( (*it).tempSyncStat() == SYNC_TEMPSTATE_DELETE && removeDeleted )|| (*it).uid().left( 19 ) == QString("last-syncAddressee-")) { |
566 | it2 = it; | 565 | it2 = it; |
@@ -569,3 +568,3 @@ void AddressBook::removeDeletedAddressees() | |||
569 | removeAddressee( it2 ); | 568 | removeAddressee( it2 ); |
570 | } else { | 569 | } else { |
571 | //qDebug("skipping %s ",(*it).uid().latin1() ); | 570 | //qDebug("skipping %s ",(*it).uid().latin1() ); |
@@ -619,2 +618,3 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd) | |||
619 | for ( it = begin(); it != end(); ++it ) { | 618 | for ( it = begin(); it != end(); ++it ) { |
619 | qDebug("check uid %s ", (*it).uid().latin1() ); | ||
620 | if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_ID || | 620 | if ( (*it).tempSyncStat() == SYNC_TEMPSTATE_NEW_ID || |
@@ -623,3 +623,3 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd) | |||
623 | if ( ad.isEmpty() ) { | 623 | if ( ad.isEmpty() ) { |
624 | qDebug("ERROR ad empty "); | 624 | qDebug("postExternSync:ERROR addressee is empty: %s ", (*it).uid().latin1()); |
625 | } else { | 625 | } else { |
@@ -635,3 +635,11 @@ void AddressBook::postExternSync( AddressBook* aBook , const QString& csd) | |||
635 | 635 | ||
636 | 636 | bool AddressBook::containsExternalUid( const QString& uid ) | |
637 | { | ||
638 | Iterator it; | ||
639 | for ( it = begin(); it != end(); ++it ) { | ||
640 | if ( uid == (*it).externalUID( ) ) | ||
641 | return true; | ||
642 | } | ||
643 | return false; | ||
644 | } | ||
637 | Addressee AddressBook::findByExternUid( const QString& uid , const QString& profile ) | 645 | Addressee AddressBook::findByExternUid( const QString& uid , const QString& profile ) |
@@ -655,2 +663,9 @@ void AddressBook::mergeAB( AddressBook *aBook, const QString& profile ) | |||
655 | } | 663 | } |
664 | #if 0 | ||
665 | // test only | ||
666 | for ( it = begin(); it != end(); ++it ) { | ||
667 | |||
668 | qDebug("uid %s ", (*it).uid().latin1()); | ||
669 | } | ||
670 | #endif | ||
656 | } | 671 | } |