-rw-r--r-- | kabc/addressbook.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 2785131..df0fba4 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp | |||
@@ -558,6 +558,27 @@ void AddressBook::removeSyncInfo( QString syncProfile) | |||
558 | Iterator ait; | 558 | Iterator ait; |
559 | for ( ait = begin(); ait != end(); ++ait ) { | 559 | for ( ait = begin(); ait != end(); ++ait ) { |
560 | (*ait).removeID( syncProfile ); | 560 | (*ait).removeID( syncProfile ); |
561 | } | ||
562 | if ( syncProfile.isEmpty() ) { | ||
563 | Iterator it = begin(); | ||
564 | Iterator it2 ; | ||
565 | QDateTime dt ( QDate( 2004,1,1) ); | ||
566 | while ( it != end() ) { | ||
567 | if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) { | ||
568 | it2 = it; | ||
569 | //qDebug("removing %s ",(*it).uid().latin1() ); | ||
570 | ++it; | ||
571 | removeAddressee( it2 ); | ||
572 | } else { | ||
573 | //qDebug("skipping %s ",(*it).uid().latin1() ); | ||
574 | ++it; | ||
575 | } | ||
576 | } | ||
577 | } else { | ||
578 | Addressee lse; | ||
579 | lse = mAddressBook->findByUid( "last-syncAddressee-"+ syncProfile ); | ||
580 | if ( ! lse.isEmpty() ) | ||
581 | removeAddressee( lse ); | ||
561 | } | 582 | } |
562 | 583 | ||
563 | } | 584 | } |