summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/kaddressbooktableview.cpp
authorzautrix <zautrix>2005-07-03 14:46:21 (UTC)
committer zautrix <zautrix>2005-07-03 14:46:21 (UTC)
commit0c632bafd2d058504118dc8957fc4808a784f548 (patch) (side-by-side diff)
tree5d726f0b4c480ac253f5c0b89907a2b624e9812d /kaddressbook/views/kaddressbooktableview.cpp
parent3be76edf08827e1e00206399469904fe69887854 (diff)
downloadkdepimpi-0c632bafd2d058504118dc8957fc4808a784f548.zip
kdepimpi-0c632bafd2d058504118dc8957fc4808a784f548.tar.gz
kdepimpi-0c632bafd2d058504118dc8957fc4808a784f548.tar.bz2
kapi search fix
Diffstat (limited to 'kaddressbook/views/kaddressbooktableview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp6
1 files changed, 3 insertions, 3 deletions
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() );