author | zautrix <zautrix> | 2005-01-12 20:38:44 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-12 20:38:44 (UTC) |
commit | 7a4a866cded40032766acb4fe8d02b6347b1d12e (patch) (unidiff) | |
tree | 14cced6e387842839616cd6727b40a522586c364 /kaddressbook/views | |
parent | ffa81b34b0d7b3c53f46869a05194072a339a69d (diff) | |
download | kdepimpi-7a4a866cded40032766acb4fe8d02b6347b1d12e.zip kdepimpi-7a4a866cded40032766acb4fe8d02b6347b1d12e.tar.gz kdepimpi-7a4a866cded40032766acb4fe8d02b6347b1d12e.tar.bz2 |
search fixes
-rw-r--r-- | kaddressbook/views/kaddressbookcardview.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbookiconview.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbooktableview.cpp | 6 |
3 files changed, 3 insertions, 7 deletions
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp index 2c9b162..2d7ed08 100644 --- a/kaddressbook/views/kaddressbookcardview.cpp +++ b/kaddressbook/views/kaddressbookcardview.cpp | |||
@@ -286,25 +286,25 @@ void KAddressBookCardView::doSearch( const QString& s,KABC::Field *field ) | |||
286 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 286 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
287 | continue; | 287 | continue; |
288 | #if QT_VERSION >= 300 | 288 | #if QT_VERSION >= 300 |
289 | if (re.search(field->value( *it ).lower()) != -1) | 289 | if (re.search(field->value( *it ).lower()) != -1) |
290 | #else | 290 | #else |
291 | if (re.match(field->value( *it ).lower()) != -1) | 291 | if (re.match(field->value( *it ).lower()) != -1) |
292 | #endif | 292 | #endif |
293 | new AddresseeCardViewItem(fields(), mShowEmptyFields, | 293 | new AddresseeCardViewItem(fields(), mShowEmptyFields, |
294 | addressBook(), *it, mCardView); | 294 | addressBook(), *it, mCardView); |
295 | 295 | ||
296 | } | 296 | } |
297 | } else { | 297 | } else { |
298 | KABC::Field::List fieldList = fields(); | 298 | KABC::Field::List fieldList = allFields(); |
299 | KABC::Field::List::ConstIterator fieldIt; | 299 | KABC::Field::List::ConstIterator fieldIt; |
300 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { | 300 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { |
301 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 301 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
302 | continue; | 302 | continue; |
303 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { | 303 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { |
304 | #if QT_VERSION >= 300 | 304 | #if QT_VERSION >= 300 |
305 | if (re.search((*fieldIt)->value( *it ).lower()) != -1) | 305 | if (re.search((*fieldIt)->value( *it ).lower()) != -1) |
306 | #else | 306 | #else |
307 | if (re.match((*fieldIt)->value( *it ).lower()) != -1) | 307 | if (re.match((*fieldIt)->value( *it ).lower()) != -1) |
308 | #endif | 308 | #endif |
309 | { | 309 | { |
310 | new AddresseeCardViewItem(fields(), mShowEmptyFields, | 310 | new AddresseeCardViewItem(fields(), mShowEmptyFields, |
diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp index 0ce56c8..faeda06 100644 --- a/kaddressbook/views/kaddressbookiconview.cpp +++ b/kaddressbook/views/kaddressbookiconview.cpp | |||
@@ -273,25 +273,25 @@ void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field ) | |||
273 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 273 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
274 | continue; | 274 | continue; |
275 | #if QT_VERSION >= 300 | 275 | #if QT_VERSION >= 300 |
276 | if (re.search(field->value( *it ).lower()) != -1) | 276 | if (re.search(field->value( *it ).lower()) != -1) |
277 | #else | 277 | #else |
278 | if (re.match(field->value( *it ).lower()) != -1) | 278 | if (re.match(field->value( *it ).lower()) != -1) |
279 | #endif | 279 | #endif |
280 | mIconList.append(new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView )); | 280 | mIconList.append(new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView )); |
281 | 281 | ||
282 | 282 | ||
283 | } | 283 | } |
284 | } else { | 284 | } else { |
285 | KABC::Field::List fieldList = fields(); | 285 | KABC::Field::List fieldList = allFields(); |
286 | KABC::Field::List::ConstIterator fieldIt; | 286 | KABC::Field::List::ConstIterator fieldIt; |
287 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { | 287 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { |
288 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 288 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
289 | continue; | 289 | continue; |
290 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { | 290 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { |
291 | #if QT_VERSION >= 300 | 291 | #if QT_VERSION >= 300 |
292 | if (re.search((*fieldIt)->value( *it ).lower()) != -1) | 292 | if (re.search((*fieldIt)->value( *it ).lower()) != -1) |
293 | #else | 293 | #else |
294 | if (re.match((*fieldIt)->value( *it ).lower()) != -1) | 294 | if (re.match((*fieldIt)->value( *it ).lower()) != -1) |
295 | #endif | 295 | #endif |
296 | { | 296 | { |
297 | mIconList.append( new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView )); | 297 | mIconList.append( new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView )); |
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp index 89053c2..61703ee 100644 --- a/kaddressbook/views/kaddressbooktableview.cpp +++ b/kaddressbook/views/kaddressbooktableview.cpp | |||
@@ -154,25 +154,25 @@ void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field ) | |||
154 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { | 154 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { |
155 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 155 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
156 | continue; | 156 | continue; |
157 | #if QT_VERSION >= 300 | 157 | #if QT_VERSION >= 300 |
158 | if (re.search(field->value( *it ).lower()) != -1) | 158 | if (re.search(field->value( *it ).lower()) != -1) |
159 | #else | 159 | #else |
160 | if (re.match(field->value( *it ).lower()) != -1) | 160 | if (re.match(field->value( *it ).lower()) != -1) |
161 | #endif | 161 | #endif |
162 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); | 162 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); |
163 | 163 | ||
164 | } | 164 | } |
165 | } else { | 165 | } else { |
166 | KABC::Field::List fieldList = fields(); | 166 | KABC::Field::List fieldList = allFields(); |
167 | KABC::Field::List::ConstIterator fieldIt; | 167 | KABC::Field::List::ConstIterator fieldIt; |
168 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { | 168 | for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { |
169 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 169 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
170 | continue; | 170 | continue; |
171 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { | 171 | for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { |
172 | #if QT_VERSION >= 300 | 172 | #if QT_VERSION >= 300 |
173 | if (re.search((*fieldIt)->value( *it ).lower()) != -1) | 173 | if (re.search((*fieldIt)->value( *it ).lower()) != -1) |
174 | #else | 174 | #else |
175 | if (re.match((*fieldIt)->value( *it ).lower()) != -1) | 175 | if (re.match((*fieldIt)->value( *it ).lower()) != -1) |
176 | #endif | 176 | #endif |
177 | { | 177 | { |
178 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); | 178 | ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); |
@@ -249,28 +249,24 @@ void KAddressBookTableView::readConfig(KConfig *config) | |||
249 | f.setBold( true ); | 249 | f.setBold( true ); |
250 | //US mListView->setHeaderFont( config->readFontEntry( "HeaderFont", &f ) ); | 250 | //US mListView->setHeaderFont( config->readFontEntry( "HeaderFont", &f ) ); |
251 | mListView->header()->setFont( config->readFontEntry( "HeaderFont", &f ) ); | 251 | mListView->header()->setFont( config->readFontEntry( "HeaderFont", &f ) ); |
252 | } | 252 | } |
253 | else | 253 | else |
254 | { | 254 | { |
255 | mListView->setFont( f ); | 255 | mListView->setFont( f ); |
256 | f.setBold( true ); | 256 | f.setBold( true ); |
257 | //US mListView->setHeaderFont( f ); | 257 | //US mListView->setHeaderFont( f ); |
258 | mListView->header()->setFont( f ); | 258 | mListView->header()->setFont( f ); |
259 | } | 259 | } |
260 | 260 | ||
261 | |||
262 | |||
263 | |||
264 | |||
265 | // Set the list view options | 261 | // Set the list view options |
266 | mListView->setAlternateBackgroundEnabled(config->readBoolEntry("ABackground", | 262 | mListView->setAlternateBackgroundEnabled(config->readBoolEntry("ABackground", |
267 | true)); | 263 | true)); |
268 | mListView->setSingleLineEnabled(config->readBoolEntry("SingleLine", false)); | 264 | mListView->setSingleLineEnabled(config->readBoolEntry("SingleLine", false)); |
269 | mListView->setToolTipsEnabled(config->readBoolEntry("ToolTips", true)); | 265 | mListView->setToolTipsEnabled(config->readBoolEntry("ToolTips", true)); |
270 | 266 | ||
271 | if (config->readBoolEntry("Background", false)) | 267 | if (config->readBoolEntry("Background", false)) |
272 | mListView->setBackgroundPixmap(config->readEntry("BackgroundName")); | 268 | mListView->setBackgroundPixmap(config->readEntry("BackgroundName")); |
273 | 269 | ||
274 | // Restore the layout of the listview | 270 | // Restore the layout of the listview |
275 | mListView->restoreLayout(config, config->group()); | 271 | mListView->restoreLayout(config, config->group()); |
276 | } | 272 | } |