diff -r f979ecb2b13e -r 42814f902fe6 searchfw/plugins/contactsplugin/src/contactssearcher.cpp --- a/searchfw/plugins/contactsplugin/src/contactssearcher.cpp Tue Feb 02 10:12:19 2010 +0200 +++ b/searchfw/plugins/contactsplugin/src/contactssearcher.cpp Fri Feb 19 22:49:53 2010 +0200 @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -391,7 +392,7 @@ else { - User::Leave( KErrNotFound ); + return NULL; } } @@ -750,8 +751,8 @@ // in the contact store. Once we get the links, we extract data from them // to be searched, and then pass the same to the text searcher - CVPbkSortOrder* sortOrder = CVPbkSortOrder::NewL( iContactManager->FieldTypes() ); - CleanupStack::PushL( sortOrder ); + CPbk2SortOrderManager* sortOrderManager = CPbk2SortOrderManager::NewL( iContactManager->FieldTypes() ); + CleanupStack::PushL( sortOrderManager ); CVPbkContactViewDefinition* viewDef = CVPbkContactViewDefinition::NewL(); CleanupStack::PushL( viewDef ); @@ -781,11 +782,11 @@ SetActive(); } iContactViewBase = iContactManager->CreateContactViewLC( - *this, *viewDef, *sortOrder ); + *this, *viewDef, sortOrderManager->SortOrder() ); CleanupStack::Pop(); // CreateContactViewLC CleanupStack::PopAndDestroy( viewDef ); - CleanupStack::PopAndDestroy( sortOrder ); + CleanupStack::PopAndDestroy( sortOrderManager ); }