summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Unidiff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index c61b387..47d298a 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -382,97 +382,97 @@ void AddressBook::removeAddressee( const Addressee &a )
382 Iterator it; 382 Iterator it;
383 for ( it = begin(); it != end(); ++it ) { 383 for ( it = begin(); it != end(); ++it ) {
384 if ( a.uid() == (*it).uid() ) { 384 if ( a.uid() == (*it).uid() ) {
385 removeAddressee( it ); 385 removeAddressee( it );
386 return; 386 return;
387 } 387 }
388 } 388 }
389} 389}
390 390
391void AddressBook::removeAddressee( const Iterator &it ) 391void AddressBook::removeAddressee( const Iterator &it )
392{ 392{
393 d->mRemovedAddressees.append( (*it) ); 393 d->mRemovedAddressees.append( (*it) );
394 d->mAddressees.remove( it.d->mIt ); 394 d->mAddressees.remove( it.d->mIt );
395} 395}
396 396
397AddressBook::Iterator AddressBook::find( const Addressee &a ) 397AddressBook::Iterator AddressBook::find( const Addressee &a )
398{ 398{
399 Iterator it; 399 Iterator it;
400 for ( it = begin(); it != end(); ++it ) { 400 for ( it = begin(); it != end(); ++it ) {
401 if ( a.uid() == (*it).uid() ) { 401 if ( a.uid() == (*it).uid() ) {
402 return it; 402 return it;
403 } 403 }
404 } 404 }
405 return end(); 405 return end();
406} 406}
407 407
408Addressee AddressBook::findByUid( const QString &uid ) 408Addressee AddressBook::findByUid( const QString &uid )
409{ 409{
410 Iterator it; 410 Iterator it;
411 for ( it = begin(); it != end(); ++it ) { 411 for ( it = begin(); it != end(); ++it ) {
412 if ( uid == (*it).uid() ) { 412 if ( uid == (*it).uid() ) {
413 return *it; 413 return *it;
414 } 414 }
415 } 415 }
416 return Addressee(); 416 return Addressee();
417} 417}
418 418
419Addressee::List AddressBook::allAddressees() 419Addressee::List AddressBook::allAddressees()
420{ 420{
421 return d->mAddressees; 421 return d->mAddressees;
422} 422}
423 423
424Addressee::List AddressBook::findByName( const QString &name ) 424Addressee::List AddressBook::findByName( const QString &name )
425{ 425{
426 Addressee::List results; 426 Addressee::List results;
427 427
428 Iterator it; 428 Iterator it;
429 for ( it = begin(); it != end(); ++it ) { 429 for ( it = begin(); it != end(); ++it ) {
430 if ( name == (*it).name() ) { 430 if ( name == (*it).realName() ) {
431 results.append( *it ); 431 results.append( *it );
432 } 432 }
433 } 433 }
434 434
435 return results; 435 return results;
436} 436}
437 437
438Addressee::List AddressBook::findByEmail( const QString &email ) 438Addressee::List AddressBook::findByEmail( const QString &email )
439{ 439{
440 Addressee::List results; 440 Addressee::List results;
441 QStringList mailList; 441 QStringList mailList;
442 442
443 Iterator it; 443 Iterator it;
444 for ( it = begin(); it != end(); ++it ) { 444 for ( it = begin(); it != end(); ++it ) {
445 mailList = (*it).emails(); 445 mailList = (*it).emails();
446 for ( QStringList::Iterator ite = mailList.begin(); ite != mailList.end(); ++ite ) { 446 for ( QStringList::Iterator ite = mailList.begin(); ite != mailList.end(); ++ite ) {
447 if ( email == (*ite) ) { 447 if ( email == (*ite) ) {
448 results.append( *it ); 448 results.append( *it );
449 } 449 }
450 } 450 }
451 } 451 }
452 452
453 return results; 453 return results;
454} 454}
455 455
456Addressee::List AddressBook::findByCategory( const QString &category ) 456Addressee::List AddressBook::findByCategory( const QString &category )
457{ 457{
458 Addressee::List results; 458 Addressee::List results;
459 459
460 Iterator it; 460 Iterator it;
461 for ( it = begin(); it != end(); ++it ) { 461 for ( it = begin(); it != end(); ++it ) {
462 if ( (*it).hasCategory( category) ) { 462 if ( (*it).hasCategory( category) ) {
463 results.append( *it ); 463 results.append( *it );
464 } 464 }
465 } 465 }
466 466
467 return results; 467 return results;
468} 468}
469 469
470void AddressBook::dump() const 470void AddressBook::dump() const
471{ 471{
472 kdDebug(5700) << "AddressBook::dump() --- begin ---" << endl; 472 kdDebug(5700) << "AddressBook::dump() --- begin ---" << endl;
473 473
474 ConstIterator it; 474 ConstIterator it;
475 for( it = begin(); it != end(); ++it ) { 475 for( it = begin(); it != end(); ++it ) {
476 (*it).dump(); 476 (*it).dump();
477 } 477 }
478 478