author | zautrix <zautrix> | 2005-07-03 14:46:21 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-03 14:46:21 (UTC) |
commit | 0c632bafd2d058504118dc8957fc4808a784f548 (patch) (unidiff) | |
tree | 5d726f0b4c480ac253f5c0b89907a2b624e9812d | |
parent | 3be76edf08827e1e00206399469904fe69887854 (diff) | |
download | kdepimpi-0c632bafd2d058504118dc8957fc4808a784f548.zip kdepimpi-0c632bafd2d058504118dc8957fc4808a784f548.tar.gz kdepimpi-0c632bafd2d058504118dc8957fc4808a784f548.tar.bz2 |
kapi search fix
-rw-r--r-- | bin/kdepim/kaddressbook/germantranslation.txt | 2 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbookcardview.cpp | 8 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbookiconview.cpp | 8 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbooktableview.cpp | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt index b2f2704..f64bfda 100644 --- a/bin/kdepim/kaddressbook/germantranslation.txt +++ b/bin/kdepim/kaddressbook/germantranslation.txt | |||
@@ -780,14 +780,14 @@ | |||
780 | { "Assistant","Assistent" }, | 780 | { "Assistant","Assistent" }, |
781 | { "Manager","Manager" }, | 781 | { "Manager","Manager" }, |
782 | { "Secrecy","Sichtbar" }, | 782 | { "Secrecy","Sichtbar" }, |
783 | { "male","männlich" }, | 783 | { "male","männlich" }, |
784 | { "female","weiblich" }, | 784 | { "female","weiblich" }, |
785 | { "Hide!","Verbergen!" }, | 785 | { "Hide!","Verbergen!" }, |
786 | { "Show!","Anzeigen!" }, | 786 | { "Show!","Anzeigen!" }, |
787 | { "Details","Details" }, | 787 | { "Details","Details" }, |
788 | { "","" }, | 788 | { "Search:","Suche:" }, |
789 | { "","" }, | 789 | { "","" }, |
790 | { "","" }, | 790 | { "","" }, |
791 | { "","" }, | 791 | { "","" }, |
792 | { "","" }, | 792 | { "","" }, |
793 | { "","" }, \ No newline at end of file | 793 | { "","" }, \ No newline at end of file |
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 | |||
@@ -310,35 +310,35 @@ void KAddressBookCardView::doSearch( const QString& s,KABC::Field *field ) | |||
310 | mCardView->viewport()->setUpdatesEnabled( false ); | 310 | mCardView->viewport()->setUpdatesEnabled( false ); |
311 | KABC::Addressee::List addresseeList = addressees(); | 311 | KABC::Addressee::List addresseeList = addressees(); |
312 | KABC::Addressee::List::Iterator it; | 312 | KABC::Addressee::List::Iterator it; |
313 | if ( field ) { | 313 | if ( field ) { |
314 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { | 314 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { |
315 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 315 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
316 | continue; | 316 | continue; |
317 | #if QT_VERSION >= 0x030000 | 317 | #if QT_VERSION >= 0x030000 |
318 | if (re.search(field->value( *it ).lower()) != -1) | 318 | if (re.search(field->value( *it ).lower()) == 0) |
319 | #else | 319 | #else |
320 | if (re.match(field->value( *it ).lower()) != -1) | 320 | if (re.match(field->value( *it ).lower()) == 0) |
321 | #endif | 321 | #endif |
322 | new AddresseeCardViewItem(fields(), mShowEmptyFields, | 322 | new AddresseeCardViewItem(fields(), mShowEmptyFields, |
323 | addressBook(), *it, mCardView); | 323 | addressBook(), *it, mCardView); |
324 | 324 | ||
325 | } | 325 | } |
326 | } else { | 326 | } else { |
327 | KABC::Field::List fieldList = allFields(); | 327 | KABC::Field::List fieldList = allFields(); |
328 | KABC::Field::List::ConstIterator fieldIt; | 328 | KABC::Field::List::ConstIterator fieldIt; |
329 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { | 329 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { |
330 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 330 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
331 | continue; | 331 | continue; |
332 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { | 332 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { |
333 | #if QT_VERSION >= 0x030000 | 333 | #if QT_VERSION >= 0x030000 |
334 | if (re.search((*fieldIt)->value( *it ).lower()) != -1) | 334 | if (re.search((*fieldIt)->value( *it ).lower()) == 0) |
335 | #else | 335 | #else |
336 | if (re.match((*fieldIt)->value( *it ).lower()) != -1) | 336 | if (re.match((*fieldIt)->value( *it ).lower()) == 0) |
337 | #endif | 337 | #endif |
338 | { | 338 | { |
339 | new AddresseeCardViewItem(fields(), mShowEmptyFields, | 339 | new AddresseeCardViewItem(fields(), mShowEmptyFields, |
340 | addressBook(), *it, mCardView); | 340 | addressBook(), *it, mCardView); |
341 | break; | 341 | break; |
342 | } | 342 | } |
343 | } | 343 | } |
344 | } | 344 | } |
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 | |||
@@ -264,35 +264,35 @@ void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field ) | |||
264 | return; | 264 | return; |
265 | KABC::Addressee::List addresseeList = addressees(); | 265 | KABC::Addressee::List addresseeList = addressees(); |
266 | KABC::Addressee::List::Iterator it; | 266 | KABC::Addressee::List::Iterator it; |
267 | if ( field ) { | 267 | if ( field ) { |
268 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { | 268 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { |
269 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 269 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
270 | continue; | 270 | continue; |
271 | #if QT_VERSION >= 0x030000 | 271 | #if QT_VERSION >= 0x030000 |
272 | if (re.search(field->value( *it ).lower()) != -1) | 272 | if (re.search(field->value( *it ).lower()) == 0) |
273 | #else | 273 | #else |
274 | if (re.match(field->value( *it ).lower()) != -1) | 274 | if (re.match(field->value( *it ).lower()) == 0) |
275 | #endif | 275 | #endif |
276 | mIconList.append(new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView )); | 276 | mIconList.append(new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView )); |
277 | 277 | ||
278 | 278 | ||
279 | } | 279 | } |
280 | } else { | 280 | } else { |
281 | KABC::Field::List fieldList = allFields(); | 281 | KABC::Field::List fieldList = allFields(); |
282 | KABC::Field::List::ConstIterator fieldIt; | 282 | KABC::Field::List::ConstIterator fieldIt; |
283 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { | 283 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { |
284 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 284 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
285 | continue; | 285 | continue; |
286 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { | 286 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { |
287 | #if QT_VERSION >= 0x030000 | 287 | #if QT_VERSION >= 0x030000 |
288 | if (re.search((*fieldIt)->value( *it ).lower()) != -1) | 288 | if (re.search((*fieldIt)->value( *it ).lower()) == 0) |
289 | #else | 289 | #else |
290 | if (re.match((*fieldIt)->value( *it ).lower()) != -1) | 290 | if (re.match((*fieldIt)->value( *it ).lower()) == 0) |
291 | #endif | 291 | #endif |
292 | { | 292 | { |
293 | mIconList.append( new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView )); | 293 | mIconList.append( new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView )); |
294 | break; | 294 | break; |
295 | } | 295 | } |
296 | } | 296 | } |
297 | } | 297 | } |
298 | } | 298 | } |
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 | |||
@@ -154,32 +154,32 @@ void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field ) | |||
154 | KABC::Addressee::List::Iterator it; | 154 | KABC::Addressee::List::Iterator it; |
155 | if ( field ) { | 155 | if ( field ) { |
156 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { | 156 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { |
157 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 157 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
158 | continue; | 158 | continue; |
159 | #if QT_VERSION >= 0x030000 | 159 | #if QT_VERSION >= 0x030000 |
160 | if (re.search(field->value( *it ).lower()) == 0) | 160 | if (re.search(field->value( *it ).lower()) == 0) |
161 | #else | 161 | #else |
162 | if (re.match(field->value( *it ).lower()) != -1) | 162 | if (re.match(field->value( *it ).lower()) == 0) |
163 | #endif | 163 | #endif |
164 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); | 164 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); |
165 | 165 | ||
166 | } | 166 | } |
167 | } else { | 167 | } else { |
168 | KABC::Field::List fieldList = allFields(); | 168 | KABC::Field::List fieldList = allFields(); |
169 | KABC::Field::List::ConstIterator fieldIt; | 169 | KABC::Field::List::ConstIterator fieldIt; |
170 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { | 170 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { |
171 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 171 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
172 | continue; | 172 | continue; |
173 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { | 173 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { |
174 | #if QT_VERSION >= 0x030000 | 174 | #if QT_VERSION >= 0x030000 |
175 | if (re.search((*fieldIt)->value( *it ).lower()) != -1) | 175 | if (re.search((*fieldIt)->value( *it ).lower()) == 0) |
176 | #else | 176 | #else |
177 | if (re.match((*fieldIt)->value( *it ).lower()) != -1) | 177 | if (re.match((*fieldIt)->value( *it ).lower()) == 0) |
178 | #endif | 178 | #endif |
179 | { | 179 | { |
180 | //qDebug("match %s %s %s", pattern.latin1(), (*fieldIt)->value( *it ).latin1(), (*fieldIt)->label().latin1() ); | 180 | //qDebug("match %s %s %s", pattern.latin1(), (*fieldIt)->value( *it ).latin1(), (*fieldIt)->label().latin1() ); |
181 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); | 181 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); |
182 | break; | 182 | break; |
183 | } | 183 | } |
184 | } | 184 | } |
185 | } | 185 | } |