diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-20 16:27:27 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-20 16:27:27 -0600 |
commit | 94273bcb909fac42ef9427e3d8a614cab8c29c66 (patch) | |
tree | 91b99186971ecb475db3ca41b1b12df24029e389 /kaddressbook/searchmanager.cpp | |
parent | 41b65d69967ad0d35f8b4dd37ac63aad1cebdae9 (diff) | |
download | tdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.tar.gz tdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.zip |
Rename KABC namespace
Diffstat (limited to 'kaddressbook/searchmanager.cpp')
-rw-r--r-- | kaddressbook/searchmanager.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kaddressbook/searchmanager.cpp b/kaddressbook/searchmanager.cpp index fef8f27db..350a4ffd8 100644 --- a/kaddressbook/searchmanager.cpp +++ b/kaddressbook/searchmanager.cpp @@ -29,30 +29,30 @@ using namespace KAB; -SearchManager::SearchManager( KABC::AddressBook *ab, +SearchManager::SearchManager( TDEABC::AddressBook *ab, TQObject *parent, const char *name ) : TQObject( parent, name ), mAddressBook( ab ) { } -void SearchManager::search( const TQString &pattern, const KABC::Field::List &fields, Type type ) +void SearchManager::search( const TQString &pattern, const TDEABC::Field::List &fields, Type type ) { mPattern = pattern; mFields = fields; mType = type; - KABC::Addressee::List allContacts; + TDEABC::Addressee::List allContacts; mContacts.clear(); #if TDE_VERSION >= 319 - KABC::AddresseeList list( mAddressBook->allAddressees() ); + TDEABC::AddresseeList list( mAddressBook->allAddressees() ); if ( !fields.isEmpty() ) list.sortByField( fields.first() ); allContacts = list; #else - KABC::AddressBook::ConstIterator abIt( mAddressBook->begin() ); - const KABC::AddressBook::ConstIterator abEndIt( mAddressBook->end() ); + TDEABC::AddressBook::ConstIterator abIt( mAddressBook->begin() ); + const TDEABC::AddressBook::ConstIterator abEndIt( mAddressBook->end() ); for ( ; abIt != abEndIt; ++abIt ) allContacts.append( *abIt ); #endif @@ -60,8 +60,8 @@ void SearchManager::search( const TQString &pattern, const KABC::Field::List &fi #ifdef TDEPIM_NEW_DISTRLISTS // Extract distribution lists from allContacts mDistributionLists.clear(); - KABC::Addressee::List::Iterator rmIt( allContacts.begin() ); - const KABC::Addressee::List::Iterator rmEndIt( allContacts.end() ); + TDEABC::Addressee::List::Iterator rmIt( allContacts.begin() ); + const TDEABC::Addressee::List::Iterator rmEndIt( allContacts.end() ); while ( rmIt != rmEndIt ) { if ( KPIM::DistributionList::isDistributionList( *rmIt ) ) { mDistributionLists.append( static_cast<KPIM::DistributionList>( *rmIt ) ); @@ -93,10 +93,10 @@ void SearchManager::search( const TQString &pattern, const KABC::Field::List &fi return; } - const KABC::Field::List fieldList = !mFields.isEmpty() ? mFields : KABC::Field::allFields(); + const TDEABC::Field::List fieldList = !mFields.isEmpty() ? mFields : TDEABC::Field::allFields(); - KABC::Addressee::List::ConstIterator it( allContacts.begin() ); - const KABC::Addressee::List::ConstIterator endIt( allContacts.end() ); + TDEABC::Addressee::List::ConstIterator it( allContacts.begin() ); + const TDEABC::Addressee::List::ConstIterator endIt( allContacts.end() ); for ( ; it != endIt; ++it ) { #ifdef TDEPIM_NEW_DISTRLISTS if ( KPIM::DistributionList::isDistributionList( *it ) ) @@ -105,8 +105,8 @@ void SearchManager::search( const TQString &pattern, const KABC::Field::List &fi bool found = false; // search over all fields - KABC::Field::List::ConstIterator fieldIt( fieldList.begin() ); - const KABC::Field::List::ConstIterator fieldEndIt( fieldList.end() ); + TDEABC::Field::List::ConstIterator fieldIt( fieldList.begin() ); + const TDEABC::Field::List::ConstIterator fieldEndIt( fieldList.end() ); for ( ; fieldIt != fieldEndIt; ++fieldIt ) { if ( type == StartsWith && (*fieldIt)->value( *it ).startsWith( pattern, false ) ) { @@ -159,7 +159,7 @@ void SearchManager::search( const TQString &pattern, const KABC::Field::List &fi emit contactsUpdated(); } -KABC::Addressee::List SearchManager::contacts() const +TDEABC::Addressee::List SearchManager::contacts() const { return mContacts; } |