79 QT_TRAP_THROWING( iPvtImpl->iSearcher->OpenDatabaseL( *iPvtImpl, baseAppClass ) ); |
81 QT_TRAP_THROWING( iPvtImpl->iSearcher->OpenDatabaseL( *iPvtImpl, baseAppClass ) ); |
80 } |
82 } |
81 |
83 |
82 int QCPixSearcher::search( QString aSearchString, QString aDefaultSearchField ) |
84 int QCPixSearcher::search( QString aSearchString, QString aDefaultSearchField ) |
83 { |
85 { |
|
86 PERF_SEARCH_RESTART_TIMER |
84 TBuf<KMaxStringLength> searchString( aSearchString.utf16() ); |
87 TBuf<KMaxStringLength> searchString( aSearchString.utf16() ); |
85 TBuf<KMaxStringLength> defaultSearchField( aDefaultSearchField.utf16() ); |
88 TBuf<KMaxStringLength> defaultSearchField( aDefaultSearchField.utf16() ); |
86 //ideally would have had just the following single line: |
89 //ideally would have had just the following single line: |
87 //QT_TRAP_THROWING( return iPvtImpl->iSearcher->SearchL( searchString, defaultSearchField ) ); |
90 //QT_TRAP_THROWING( return iPvtImpl->iSearcher->SearchL( searchString, defaultSearchField ) ); |
88 //But the RCVT compiler throws up warnings. The following is just to suppress those warnings. |
91 //But the RCVT compiler throws up warnings. The following is just to suppress those warnings. |
89 int tmp = 0; |
92 int tmp = 0; |
90 QT_TRAP_THROWING( tmp = iPvtImpl->iSearcher->SearchL( searchString, defaultSearchField ) ); |
93 QT_TRAP_THROWING( tmp = iPvtImpl->iSearcher->SearchL( searchString, defaultSearchField ) ); |
|
94 PERF_SEARCH_ENDLOG |
91 return tmp; |
95 return tmp; |
92 } |
96 } |
93 |
97 |
94 void QCPixSearcher::searchAsync( QString aSearchString, QString aDefaultSearchField ) |
98 void QCPixSearcher::searchAsync( QString aSearchString, QString aDefaultSearchField ) |
95 { |
99 { |
|
100 PERF_TIME_NOW("Async search start") |
96 TBuf<KMaxStringLength> searchString( aSearchString.utf16() ); |
101 TBuf<KMaxStringLength> searchString( aSearchString.utf16() ); |
97 TBuf<KMaxStringLength> defaultSearchField( aDefaultSearchField.utf16() ); |
102 TBuf<KMaxStringLength> defaultSearchField( aDefaultSearchField.utf16() ); |
98 QT_TRAP_THROWING( iPvtImpl->iSearcher->SearchL( *iPvtImpl, searchString, defaultSearchField ) ); |
103 QT_TRAP_THROWING( iPvtImpl->iSearcher->SearchL( *iPvtImpl, searchString, defaultSearchField ) ); |
99 } |
104 } |
100 |
105 |
101 QCPixDocument* QCPixSearcher::getDocument( int aIndex ) |
106 QCPixDocument* QCPixSearcher::getDocument( int aIndex ) |
102 { |
107 { |
|
108 PERF_GETDOC_RESTART_TIMER |
103 QCPixDocument* tmp = 0; |
109 QCPixDocument* tmp = 0; |
104 QT_TRAP_THROWING( tmp = QCPixDocFromCPixDoc( iPvtImpl->iSearcher->GetDocumentL( aIndex ) ) ); |
110 QT_TRAP_THROWING( tmp = QCPixDocFromCPixDoc( iPvtImpl->iSearcher->GetDocumentL( aIndex ) ) ); |
|
111 PERF_GETDOC_ENDLOG |
105 return tmp; |
112 return tmp; |
106 } |
113 } |
107 |
114 |
108 void QCPixSearcher::getDocumentAsync( int aIndex ) |
115 void QCPixSearcher::getDocumentAsync( int aIndex ) |
109 { |
116 { |
|
117 PERF_TIME_NOW("Async get document start") |
110 QT_TRAP_THROWING( iPvtImpl->iSearcher->GetDocumentL( aIndex, *iPvtImpl ) ); |
118 QT_TRAP_THROWING( iPvtImpl->iSearcher->GetDocumentL( aIndex, *iPvtImpl ) ); |
111 } |
119 } |
112 |
120 |
113 void QCPixSearcher::cancelSearch() |
121 void QCPixSearcher::cancelSearch() |
114 { |
122 { |