-rw-r--r-- | kaddressbook/kabcore.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index b06e1bc..7cba9aa 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -646,49 +646,49 @@ void KABCore::setCategories() | |||
646 | } | 646 | } |
647 | 647 | ||
648 | mAddressBook->insertAddressee( addr ); | 648 | mAddressBook->insertAddressee( addr ); |
649 | } | 649 | } |
650 | } | 650 | } |
651 | 651 | ||
652 | if ( uids.count() > 0 ) | 652 | if ( uids.count() > 0 ) |
653 | setModified( true ); | 653 | setModified( true ); |
654 | } | 654 | } |
655 | 655 | ||
656 | void KABCore::setSearchFields( const KABC::Field::List &fields ) | 656 | void KABCore::setSearchFields( const KABC::Field::List &fields ) |
657 | { | 657 | { |
658 | mIncSearchWidget->setFields( fields ); | 658 | mIncSearchWidget->setFields( fields ); |
659 | } | 659 | } |
660 | 660 | ||
661 | void KABCore::incrementalSearch( const QString& text ) | 661 | void KABCore::incrementalSearch( const QString& text ) |
662 | { | 662 | { |
663 | mViewManager->setSelected( QString::null, false ); | 663 | mViewManager->setSelected( QString::null, false ); |
664 | 664 | ||
665 | if ( !text.isEmpty() ) { | 665 | if ( !text.isEmpty() ) { |
666 | KABC::Field *field = mIncSearchWidget->currentField(); | 666 | KABC::Field *field = mIncSearchWidget->currentField(); |
667 | 667 | ||
668 | QString pattern = text.lower(); | 668 | QString pattern = text.lower(); |
669 | 669 | ||
670 | #if KDE_VERSION >= 319 | 670 | #if 1 //KDE_VERSION >= 319 |
671 | KABC::AddresseeList list( mAddressBook->allAddressees() ); | 671 | KABC::AddresseeList list( mAddressBook->allAddressees() ); |
672 | if ( field ) { | 672 | if ( field ) { |
673 | list.sortByField( field ); | 673 | list.sortByField( field ); |
674 | KABC::AddresseeList::Iterator it; | 674 | KABC::AddresseeList::Iterator it; |
675 | for ( it = list.begin(); it != list.end(); ++it ) { | 675 | for ( it = list.begin(); it != list.end(); ++it ) { |
676 | if ( field->value( *it ).lower().startsWith( pattern ) ) { | 676 | if ( field->value( *it ).lower().startsWith( pattern ) ) { |
677 | mViewManager->setSelected( (*it).uid(), true ); | 677 | mViewManager->setSelected( (*it).uid(), true ); |
678 | return; | 678 | return; |
679 | } | 679 | } |
680 | } | 680 | } |
681 | } else { | 681 | } else { |
682 | KABC::AddresseeList::Iterator it; | 682 | KABC::AddresseeList::Iterator it; |
683 | for ( it = list.begin(); it != list.end(); ++it ) { | 683 | for ( it = list.begin(); it != list.end(); ++it ) { |
684 | KABC::Field::List fieldList = mIncSearchWidget->fields(); | 684 | KABC::Field::List fieldList = mIncSearchWidget->fields(); |
685 | KABC::Field::List::ConstIterator fieldIt; | 685 | KABC::Field::List::ConstIterator fieldIt; |
686 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { | 686 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { |
687 | if ( (*fieldIt)->value( *it ).lower().startsWith( pattern ) ) { | 687 | if ( (*fieldIt)->value( *it ).lower().startsWith( pattern ) ) { |
688 | mViewManager->setSelected( (*it).uid(), true ); | 688 | mViewManager->setSelected( (*it).uid(), true ); |
689 | return; | 689 | return; |
690 | } | 690 | } |
691 | } | 691 | } |
692 | } | 692 | } |
693 | } | 693 | } |
694 | #else | 694 | #else |