157 |
157 |
158 //We index the exe name (without extension), only if the title is not present. |
158 //We index the exe name (without extension), only if the title is not present. |
159 if( aAppInfo.iShortCaption.Compare(KNullDesC) ) |
159 if( aAppInfo.iShortCaption.Compare(KNullDesC) ) |
160 { |
160 { |
161 aDocument->AddFieldL(KApplicationFieldCaption, aAppInfo.iShortCaption, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); |
161 aDocument->AddFieldL(KApplicationFieldCaption, aAppInfo.iShortCaption, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EIndexFreeText); |
|
162 #ifdef USE_HIGHLIGHTER |
|
163 aDocument->AddHLDisplayFieldL(aAppInfo.iShortCaption); |
|
164 #endif |
162 } |
165 } |
163 else |
166 else |
164 { |
167 { |
165 //Find the *last* location of '\' and remove the .exe to get just the filename. |
168 //Find the *last* location of '\' and remove the .exe to get just the filename. |
166 TInt location = aAppInfo.iFullName.LocateReverse('\\'); |
169 TInt location = aAppInfo.iFullName.LocateReverse('\\'); |
167 if( location > 0 ) |
170 if( location > 0 ) |
168 { |
171 { |
169 TInt lengthOfNameWithoutExtention = aAppInfo.iFullName.Length() -location -1; //-1 to increment one past '\'. |
172 TInt lengthOfNameWithoutExtention = aAppInfo.iFullName.Length() -location -1; //-1 to increment one past '\'. |
170 TPtrC appName = aAppInfo.iFullName.Right( lengthOfNameWithoutExtention ); |
173 TPtrC appName = aAppInfo.iFullName.Right( lengthOfNameWithoutExtention ); |
171 aDocument->AddFieldL(KApplicationFieldAbsolutePath, appName.Left( appName.Length() -4 /*remove ".exe"*/), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized ); |
174 aDocument->AddFieldL(KApplicationFieldAbsolutePath, appName.Left( appName.Length() -4 /*remove ".exe"*/), CDocumentField::EStoreYes | CDocumentField::EIndexTokenized ); |
|
175 #ifdef USE_HIGHLIGHTER |
|
176 aDocument->AddHLDisplayFieldL(appName.Left( appName.Length() -4 /*remove ".exe"*/)); |
|
177 #endif |
172 } |
178 } |
173 } |
179 } |
174 //For applications, no content to go into exceprt field, for more info, check the appclass-hierarchy.txt |
180 //For applications, no content to go into exceprt field, for more info, check the appclass-hierarchy.txt |
175 //aDocument->AddExcerptL( aAppInfo.iCaption ); |
181 //aDocument->AddExcerptL( aAppInfo.iCaption ); |
176 aDocument->AddExcerptL( KNullDesC ); |
182 aDocument->AddExcerptL( KNullDesC ); |