author | zautrix <zautrix> | 2004-10-26 22:19:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-26 22:19:18 (UTC) |
commit | 6385f303bef3cbcd19d097a7b05c30e144d5dd6e (patch) (side-by-side diff) | |
tree | 770795d94ea6ec1dc8bcaa67cc174a9c0add564a /kabc | |
parent | 13e996beddabc5e88f4f2fe49b2ce6cb8408eb30 (diff) | |
download | kdepimpi-6385f303bef3cbcd19d097a7b05c30e144d5dd6e.zip kdepimpi-6385f303bef3cbcd19d097a7b05c30e144d5dd6e.tar.gz kdepimpi-6385f303bef3cbcd19d097a7b05c30e144d5dd6e.tar.bz2 |
implemented remove sync info for kopi and kapi
-rw-r--r-- | kabc/addressbook.cpp | 8 | ||||
-rw-r--r-- | kabc/addressbook.h | 1 | ||||
-rw-r--r-- | kabc/addressee.cpp | 5 |
3 files changed, 13 insertions, 1 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 3641c0c..2785131 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -550,12 +550,20 @@ void AddressBook::smplifyAddressees() (*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( ":"); diff --git a/kabc/addressbook.h b/kabc/addressbook.h index 5edca06..f124dc9 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h @@ -141,12 +141,13 @@ class AddressBook : public QObject @param ticket a ticket object returned by @ref requestSaveTicket() */ bool save( Ticket *ticket ); bool saveAB( ); bool saveABphone( QString fileName ); void smplifyAddressees(); + void removeSyncInfo( QString syncProfile); void preparePhoneSync( QString currentSyncDevice, bool isPreSync ); void export2File( QString fileName ); bool export2PhoneFormat( QStringList uids ,QString fileName ); int importFromFile( QString fileName, bool replaceLabel = false, bool removeOld = false ); void setUntagged( bool setNonSyncTagged = false ); void removeUntagged(); diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 40877ef..a660a9d 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -550,13 +550,16 @@ void Addressee::simplifyPhoneNumberTypes() ++phoneIter ) ( *phoneIter ).simplifyType(); } void Addressee::removeID(const QString &prof) { detach(); - mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); + if ( prof.isEmpty() ) + mData->mExternalId = ":"; + else + mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); } void Addressee::setID( const QString & prof , const QString & id ) { detach(); mData->mExternalId = KIdManager::setId ( mData->mExternalId, prof, id ); |