Diffstat (limited to 'kaddressbook/views/kaddressbookcardview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/views/kaddressbookcardview.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp index ca21016..b503652 100644 --- a/kaddressbook/views/kaddressbookcardview.cpp +++ b/kaddressbook/views/kaddressbookcardview.cpp @@ -329,6 +329,7 @@ void KAddressBookCardView::doSearch( const QString& s,KABC::Field *field ) for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) continue; + bool match = false; for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { #if QT_VERSION >= 0x030000 if (re.search((*fieldIt)->value( *it ).lower()) == 0) @@ -338,6 +339,23 @@ void KAddressBookCardView::doSearch( const QString& s,KABC::Field *field ) { new AddresseeCardViewItem(fields(), mShowEmptyFields, addressBook(), *it, mCardView); + match = true; + break; + } + } + if ( ! match ) { + if ( (*it).matchPhoneNumber( &re ) ) { + new AddresseeCardViewItem(fields(), mShowEmptyFields, + addressBook(), *it, mCardView); + match = true; + break; + } + } + if ( ! match ) { + if ( (*it).matchAddress( &re ) ) { + new AddresseeCardViewItem(fields(), mShowEmptyFields, + addressBook(), *it, mCardView); + match = true; break; } } |