From 07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861 Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 08 Oct 2004 23:38:07 +0000 Subject: some bugfixes --- (limited to 'kabc/addressee.cpp') diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index e571980..19a1845 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -315,6 +315,22 @@ void Addressee::mergeContact( const Addressee& ad ) setRevision( ad.revision() ); } +void Addressee::simplifyAddresses() +{ + if ( mData->addresses.count() < 3 ) return ; + int count = 0; + Address::List list; + Address::List::Iterator it; + for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) { + if ( count > 1 ) + list.append( *it ); + ++count; + } + for( it = list.begin(); it != list.end(); ++it ) { + removeAddress( (*it) ); + } +} + // removes all emails but the first // needed by phone sync void Addressee::simplifyEmails() -- cgit v0.9.0.2