summaryrefslogtreecommitdiffabout
path: root/kabc/addressee.cpp
authorzautrix <zautrix>2004-10-08 23:38:07 (UTC)
committer zautrix <zautrix>2004-10-08 23:38:07 (UTC)
commit07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861 (patch) (unidiff)
tree03d0e5d20e607e035e17fcdabd6bce789069f41e /kabc/addressee.cpp
parent44169895703beb3e8b1551a313d2d341bf742905 (diff)
downloadkdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.zip
kdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.tar.gz
kdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.tar.bz2
some bugfixes
Diffstat (limited to 'kabc/addressee.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp16
1 files changed, 16 insertions, 0 deletions
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 )
315 setRevision( ad.revision() ); 315 setRevision( ad.revision() );
316} 316}
317 317
318void Addressee::simplifyAddresses()
319{
320 if ( mData->addresses.count() < 3 ) return ;
321 int count = 0;
322 Address::List list;
323 Address::List::Iterator it;
324 for( it = mData->addresses.begin(); it != mData->addresses.end(); ++it ) {
325 if ( count > 1 )
326 list.append( *it );
327 ++count;
328 }
329 for( it = list.begin(); it != list.end(); ++it ) {
330 removeAddress( (*it) );
331 }
332}
333
318// removes all emails but the first 334// removes all emails but the first
319// needed by phone sync 335// needed by phone sync
320void Addressee::simplifyEmails() 336void Addressee::simplifyEmails()