From 0c632bafd2d058504118dc8957fc4808a784f548 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 03 Jul 2005 14:46:21 +0000 Subject: kapi search fix --- (limited to 'kaddressbook/views/kaddressbooktableview.cpp') 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() ); -- cgit v0.9.0.2