summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Side-by-side diff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (show 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()
Iterator todel;
for ( ait = begin(); ait != end(); ++ait ) {
if ( todelete )
removeAddressee( todel );
if (!(*ait).tagged()) {
todelete = true;
todel = ait;
} else
todelete = false;
}
if ( todelete )
removeAddressee( todel );
deleteRemovedAddressees();
}
void AddressBook::smplifyAddressees()
{
Iterator ait;
for ( ait = begin(); ait != end(); ++ait ) {
(*ait).simplifyEmails();
(*ait).simplifyPhoneNumbers();
(*ait).simplifyPhoneNumberTypes();
(*ait).simplifyAddresses();
}
}
+void AddressBook::removeSyncInfo( QString syncProfile)
+{
+ Iterator ait;
+ for ( ait = begin(); ait != end(); ++ait ) {
+ (*ait).removeID( syncProfile );
+ }
+
+}
void AddressBook::preparePhoneSync( QString currentSyncDevice, bool isPreSync )
{
Iterator ait;
for ( ait = begin(); ait != end(); ++ait ) {
QString id = (*ait).IDStr();
(*ait).setIDStr( ":");
(*ait).setExternalUID( id );
(*ait).setOriginalExternalUID( id );
if ( isPreSync )
(*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_EXTERNAL );
else {
(*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
(*ait).setID( currentSyncDevice,id );
}
}
}
void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice )
{
setUntagged();
KABC::Addressee::List list;
QFile file( fileName );
file.open( IO_ReadOnly );