summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views
Side-by-side diff
Diffstat (limited to 'kaddressbook/views') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/kaddressbookcardview.cpp8
-rw-r--r--kaddressbook/views/kaddressbookiconview.cpp8
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp6
3 files changed, 11 insertions, 11 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
@@ -315,9 +315,9 @@ void KAddressBookCardView::doSearch( const QString& s,KABC::Field *field )
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);
@@ -331,9 +331,9 @@ void KAddressBookCardView::doSearch( const QString& s,KABC::Field *field )
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,
diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp
index 3bdfd1a..4bbdf1d 100644
--- a/kaddressbook/views/kaddressbookiconview.cpp
+++ b/kaddressbook/views/kaddressbookiconview.cpp
@@ -269,9 +269,9 @@ void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field )
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
mIconList.append(new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView ));
@@ -285,9 +285,9 @@ void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field )
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
{
mIconList.append( new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView ));
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index 565cd1d..348f491 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -159,7 +159,7 @@ void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field )
#if QT_VERSION >= 0x030000
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
ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields());
@@ -172,9 +172,9 @@ void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field )
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
{
//qDebug("match %s %s %s", pattern.latin1(), (*fieldIt)->value( *it ).latin1(), (*fieldIt)->label().latin1() );