summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Unidiff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index d101589..9b196b5 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -849,34 +849,37 @@ void AddressBook::removeAddressee( const Addressee &a )
849 849
850 } 850 }
851 } 851 }
852 852
853 if ( found ) 853 if ( found )
854 removeAddressee( it2 ); 854 removeAddressee( it2 );
855 855
856} 856}
857 857
858void AddressBook::removeSyncAddressees( bool removeDeleted ) 858void AddressBook::removeSyncAddressees( bool removeDeleted )
859{ 859{
860 Iterator it = begin(); 860 Iterator it = begin();
861 Iterator it2 ; 861 Iterator it2 ;
862 QDateTime dt ( QDate( 2004,1,1) ); 862 QDateTime dt ( QDate( 2004,1,1) );
863 while ( it != end() ) { 863 while ( it != end() ) {
864 (*it).setRevision( dt ); 864 (*it).setRevision( dt );
865 (*it).removeCustom( "KADDRESSBOOK", "X-ExternalID" ); 865 if (( *it).IDStr() != "changed" ) {
866 (*it).setIDStr(""); 866 // "changed" is used for tagging changed addressees when syncing with KDE or OL
867 (*it).removeCustom( "KADDRESSBOOK", "X-ExternalID" );
868 (*it).setIDStr("");
869 }
867 if ( ( (*it).tempSyncStat() == SYNC_TEMPSTATE_DELETE && removeDeleted )|| (*it).uid().left( 19 ) == QString("last-syncAddressee-")) { 870 if ( ( (*it).tempSyncStat() == SYNC_TEMPSTATE_DELETE && removeDeleted )|| (*it).uid().left( 19 ) == QString("last-syncAddressee-")) {
868 it2 = it; 871 it2 = it;
869 //qDebug("removing %s ",(*it).uid().latin1() ); 872 //qDebug("removing %s ",(*it).uid().latin1() );
870 ++it; 873 ++it;
871 removeAddressee( it2 ); 874 removeAddressee( it2 );
872 } else { 875 } else {
873 //qDebug("skipping %s ",(*it).uid().latin1() ); 876 //qDebug("skipping %s ",(*it).uid().latin1() );
874 ++it; 877 ++it;
875 } 878 }
876 } 879 }
877 deleteRemovedAddressees(); 880 deleteRemovedAddressees();
878} 881}
879 882
880void AddressBook::removeAddressee( const Iterator &it ) 883void AddressBook::removeAddressee( const Iterator &it )
881{ 884{
882 d->mRemovedAddressees.append( (*it) ); 885 d->mRemovedAddressees.append( (*it) );