summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/kaddressbookcardview.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/views/kaddressbookcardview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/kaddressbookcardview.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp
index 9c35fd6..ca21016 100644
--- a/kaddressbook/views/kaddressbookcardview.cpp
+++ b/kaddressbook/views/kaddressbookcardview.cpp
@@ -312,15 +312,15 @@ void KAddressBookCardView::doSearch( const QString& s,KABC::Field *field )
KABC::Addressee::List::Iterator it;
if ( field ) {
for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) {
if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
continue;
#if QT_VERSION >= 0x030000
- if (re.search(field->value( *it ).lower()) != -1)
+ if (re.search(field->value( *it ).lower()) == 0)
#else
- if (re.match(field->value( *it ).lower()) != -1)
+ if (re.match(field->value( *it ).lower()) == 0)
#endif
new AddresseeCardViewItem(fields(), mShowEmptyFields,
addressBook(), *it, mCardView);
}
} else {
@@ -328,15 +328,15 @@ void KAddressBookCardView::doSearch( const QString& s,KABC::Field *field )
KABC::Field::List::ConstIterator fieldIt;
for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) {
if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") )
continue;
for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) {
#if QT_VERSION >= 0x030000
- if (re.search((*fieldIt)->value( *it ).lower()) != -1)
+ if (re.search((*fieldIt)->value( *it ).lower()) == 0)
#else
- if (re.match((*fieldIt)->value( *it ).lower()) != -1)
+ if (re.match((*fieldIt)->value( *it ).lower()) == 0)
#endif
{
new AddresseeCardViewItem(fields(), mShowEmptyFields,
addressBook(), *it, mCardView);
break;
}