summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Unidiff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 3641c0c..2785131 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -532,48 +532,56 @@ void AddressBook::removeUntagged()
532 Iterator todel; 532 Iterator todel;
533 for ( ait = begin(); ait != end(); ++ait ) { 533 for ( ait = begin(); ait != end(); ++ait ) {
534 if ( todelete ) 534 if ( todelete )
535 removeAddressee( todel ); 535 removeAddressee( todel );
536 if (!(*ait).tagged()) { 536 if (!(*ait).tagged()) {
537 todelete = true; 537 todelete = true;
538 todel = ait; 538 todel = ait;
539 } else 539 } else
540 todelete = false; 540 todelete = false;
541 } 541 }
542 if ( todelete ) 542 if ( todelete )
543 removeAddressee( todel ); 543 removeAddressee( todel );
544 deleteRemovedAddressees(); 544 deleteRemovedAddressees();
545} 545}
546void AddressBook::smplifyAddressees() 546void AddressBook::smplifyAddressees()
547{ 547{
548 Iterator ait; 548 Iterator ait;
549 for ( ait = begin(); ait != end(); ++ait ) { 549 for ( ait = begin(); ait != end(); ++ait ) {
550 (*ait).simplifyEmails(); 550 (*ait).simplifyEmails();
551 (*ait).simplifyPhoneNumbers(); 551 (*ait).simplifyPhoneNumbers();
552 (*ait).simplifyPhoneNumberTypes(); 552 (*ait).simplifyPhoneNumberTypes();
553 (*ait).simplifyAddresses(); 553 (*ait).simplifyAddresses();
554 } 554 }
555} 555}
556void AddressBook::removeSyncInfo( QString syncProfile)
557{
558 Iterator ait;
559 for ( ait = begin(); ait != end(); ++ait ) {
560 (*ait).removeID( syncProfile );
561 }
562
563}
556void AddressBook::preparePhoneSync( QString currentSyncDevice, bool isPreSync ) 564void AddressBook::preparePhoneSync( QString currentSyncDevice, bool isPreSync )
557{ 565{
558 Iterator ait; 566 Iterator ait;
559 for ( ait = begin(); ait != end(); ++ait ) { 567 for ( ait = begin(); ait != end(); ++ait ) {
560 QString id = (*ait).IDStr(); 568 QString id = (*ait).IDStr();
561 (*ait).setIDStr( ":"); 569 (*ait).setIDStr( ":");
562 (*ait).setExternalUID( id ); 570 (*ait).setExternalUID( id );
563 (*ait).setOriginalExternalUID( id ); 571 (*ait).setOriginalExternalUID( id );
564 if ( isPreSync ) 572 if ( isPreSync )
565 (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_EXTERNAL ); 573 (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_EXTERNAL );
566 else { 574 else {
567 (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); 575 (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
568 (*ait).setID( currentSyncDevice,id ); 576 (*ait).setID( currentSyncDevice,id );
569 577
570 } 578 }
571 } 579 }
572} 580}
573void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice ) 581void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice )
574{ 582{
575 583
576 setUntagged(); 584 setUntagged();
577 KABC::Addressee::List list; 585 KABC::Addressee::List list;
578 QFile file( fileName ); 586 QFile file( fileName );
579 file.open( IO_ReadOnly ); 587 file.open( IO_ReadOnly );