summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.cpp
Unidiff
Diffstat (limited to 'kabc/addressee.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/addressee.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 25c77f6..e571980 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -317,2 +317,34 @@ void Addressee::mergeContact( const Addressee& ad )
317 317
318// removes all emails but the first
319// needed by phone sync
320void Addressee::simplifyEmails()
321{
322 if ( mData->emails.count() == 0 ) return ;
323 QString email = mData->emails.first();
324 detach();
325 mData->emails.clear();
326 mData->emails.append( email );
327}
328
329void Addressee::simplifyPhoneNumbers()
330{
331 KABC::PhoneNumber::List removeNumbers;
332 KABC::PhoneNumber::List::Iterator phoneIter;
333 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end();
334 ++phoneIter ) {
335 if ( ! ( *phoneIter ).simplifyNumber() )
336 removeNumbers.append( ( *phoneIter ) );
337 }
338 for ( phoneIter = removeNumbers.begin(); phoneIter != removeNumbers.end();
339 ++phoneIter ) {
340 removePhoneNumber(( *phoneIter ));
341 }
342}
343void Addressee::simplifyPhoneNumberTypes()
344{
345 KABC::PhoneNumber::List::Iterator phoneIter;
346 for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end();
347 ++phoneIter )
348 ( *phoneIter ).simplifyType();
349}
318void Addressee::removeID(const QString &prof) 350void Addressee::removeID(const QString &prof)