equal
deleted
inserted
replaced
29 #include "c12keypredictivesearchtable.h" |
29 #include "c12keypredictivesearchtable.h" |
30 #include "cqwertypredictivesearchtable.h" |
30 #include "cqwertypredictivesearchtable.h" |
31 #include "cpredictivesearchsettingstable.h" |
31 #include "cpredictivesearchsettingstable.h" |
32 #include "cpredictivesearchsynchronizer.h" |
32 #include "cpredictivesearchsynchronizer.h" |
33 #include "predictivesearchlog.h" |
33 #include "predictivesearchlog.h" |
|
34 #include "cntsqlsearch.h" |
|
35 |
34 //#include "cntmetadataoperation.h" |
36 //#include "cntmetadataoperation.h" |
|
37 |
35 #include <cntdef.h> |
38 #include <cntdef.h> |
36 #include <sqldb.h> |
39 #include <sqldb.h> |
37 #include <cntdb.h> |
40 #include <cntdb.h> |
38 |
41 |
39 // TODO: The code related to predictive search table is placed inside this |
42 // TODO: The code related to predictive search table is placed inside this |
825 CleanupStack::Pop(array); |
828 CleanupStack::Pop(array); |
826 |
829 |
827 return array; |
830 return array; |
828 } |
831 } |
829 |
832 |
|
833 |
|
834 CBufSeg* CPplContactItemManager::DetailsListPredictiveL(const TDesC& aSearchPattern ) const |
|
835 { |
|
836 |
|
837 |
|
838 QString qString; |
|
839 QString queryString; |
|
840 CntSqlSearch sqlSearch( *iPredSearch12keyTable->KeyMap(), |
|
841 *iPredSearchQwertyTable->KeyMap() ); |
|
842 |
|
843 QT_TRYCATCH_LEAVING({ |
|
844 qString = QString((QChar*)aSearchPattern.Ptr(),aSearchPattern.Length()); |
|
845 queryString = sqlSearch.CreatePredictiveSearch( qString ); |
|
846 }); |
|
847 TPtrC query (reinterpret_cast<const TText*>(queryString.constData()),queryString.length()); |
|
848 return DetailsListL( query ); |
|
849 } |
|
850 |
830 /** |
851 /** |
831 Utility method used to rthe prefered card template id |
852 Utility method used to rthe prefered card template id |
832 */ |
853 */ |
833 TInt CPplContactItemManager::CardTemplatePrefIdL() const |
854 TInt CPplContactItemManager::CardTemplatePrefIdL() const |
834 { |
855 { |
855 #if defined(USE_PRED_SEARCH_TABLE) |
876 #if defined(USE_PRED_SEARCH_TABLE) |
856 iPredictiveSearchSynchronizer->DeletePredSearchTablesL(); |
877 iPredictiveSearchSynchronizer->DeletePredSearchTablesL(); |
857 iPredictiveSearchSynchronizer->CreatePredSearchTablesL(); |
878 iPredictiveSearchSynchronizer->CreatePredSearchTablesL(); |
858 #endif |
879 #endif |
859 } |
880 } |
|
881 |
|
882 |