author | zautrix <zautrix> | 2004-07-05 09:51:38 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-05 09:51:38 (UTC) |
commit | 93f9b1e0a8935210b03a094ce18949b7197041aa (patch) (unidiff) | |
tree | f9d4a531755ead00068367f56c4987446e59af13 /kaddressbook | |
parent | 5c5c1354afa5d24768ceefe5b7dd8733ff7bd5f0 (diff) | |
download | kdepimpi-93f9b1e0a8935210b03a094ce18949b7197041aa.zip kdepimpi-93f9b1e0a8935210b03a094ce18949b7197041aa.tar.gz kdepimpi-93f9b1e0a8935210b03a094ce18949b7197041aa.tar.bz2 |
Fixed searching order
-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 | |||
@@ -658,25 +658,25 @@ void KABCore::setSearchFields( const KABC::Field::List &fields ) | |||
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; |