author | zautrix <zautrix> | 2004-10-29 11:41:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-29 11:41:57 (UTC) |
commit | 8c55eb6afe84ef69bb284d384a0c9f1ef1484ad8 (patch) (side-by-side diff) | |
tree | eda3f48b2a157146d936afef45d0a72f864fedcd /kaddressbook/views | |
parent | 443116d2682cd221c25201926e35d825170bdbbd (diff) | |
download | kdepimpi-8c55eb6afe84ef69bb284d384a0c9f1ef1484ad8.zip kdepimpi-8c55eb6afe84ef69bb284d384a0c9f1ef1484ad8.tar.gz kdepimpi-8c55eb6afe84ef69bb284d384a0c9f1ef1484ad8.tar.bz2 |
fix of excluding last sync addreessees in search
-rw-r--r-- | kaddressbook/views/kaddressbookcardview.cpp | 4 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbookiconview.cpp | 4 | ||||
-rw-r--r-- | kaddressbook/views/kaddressbooktableview.cpp | 6 |
3 files changed, 13 insertions, 1 deletions
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp index 15f154e..2c9b162 100644 --- a/kaddressbook/views/kaddressbookcardview.cpp +++ b/kaddressbook/views/kaddressbookcardview.cpp @@ -280,12 +280,14 @@ void KAddressBookCardView::doSearch( const QString& s,KABC::Field *field ) return; mCardView->viewport()->setUpdatesEnabled( false ); KABC::Addressee::List addresseeList = addressees(); KABC::Addressee::List::Iterator it; if ( field ) { for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { + if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) + continue; #if QT_VERSION >= 300 if (re.search(field->value( *it ).lower()) != -1) #else if (re.match(field->value( *it ).lower()) != -1) #endif new AddresseeCardViewItem(fields(), mShowEmptyFields, @@ -293,12 +295,14 @@ void KAddressBookCardView::doSearch( const QString& s,KABC::Field *field ) } } else { KABC::Field::List fieldList = fields(); KABC::Field::List::ConstIterator fieldIt; for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { + if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) + continue; for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { #if QT_VERSION >= 300 if (re.search((*fieldIt)->value( *it ).lower()) != -1) #else if (re.match((*fieldIt)->value( *it ).lower()) != -1) #endif diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp index 41c3cb2..0ce56c8 100644 --- a/kaddressbook/views/kaddressbookiconview.cpp +++ b/kaddressbook/views/kaddressbookiconview.cpp @@ -267,12 +267,14 @@ void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field ) if (!re.isValid()) return; KABC::Addressee::List addresseeList = addressees(); KABC::Addressee::List::Iterator it; if ( field ) { for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { + if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) + continue; #if QT_VERSION >= 300 if (re.search(field->value( *it ).lower()) != -1) #else if (re.match(field->value( *it ).lower()) != -1) #endif mIconList.append(new AddresseeIconViewItem( fields(), addressBook(), *it, mIconView )); @@ -280,12 +282,14 @@ void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field ) } } else { KABC::Field::List fieldList = fields(); KABC::Field::List::ConstIterator fieldIt; for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { + if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) + continue; for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { #if QT_VERSION >= 300 if (re.search((*fieldIt)->value( *it ).lower()) != -1) #else if (re.match((*fieldIt)->value( *it ).lower()) != -1) #endif diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp index 6f20e05..89053c2 100644 --- a/kaddressbook/views/kaddressbooktableview.cpp +++ b/kaddressbook/views/kaddressbooktableview.cpp @@ -148,25 +148,29 @@ void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field ) re.setPattern( pattern ); if (!re.isValid()) return; KABC::Addressee::List addresseeList = addressees(); KABC::Addressee::List::Iterator it; if ( field ) { - for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { + for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { + if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) + continue; #if QT_VERSION >= 300 if (re.search(field->value( *it ).lower()) != -1) #else if (re.match(field->value( *it ).lower()) != -1) #endif ContactListViewItem *item = new ContactListViewItem(*it, mListView, addressBook(), fields()); } } else { KABC::Field::List fieldList = fields(); KABC::Field::List::ConstIterator fieldIt; for (it = addresseeList.begin(); it != addresseeList.end(); ++it ) { + if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) + continue; for ( fieldIt = fieldList.begin(); fieldIt != fieldList.end(); ++fieldIt ) { #if QT_VERSION >= 300 if (re.search((*fieldIt)->value( *it ).lower()) != -1) #else if (re.match((*fieldIt)->value( *it ).lower()) != -1) #endif |