harvesterplugins/applications/src/applicationsplugin.cpp
changeset 17 7d8c8d8f5eab
parent 11 773be20e0a25
child 20 68cdadcf169e
--- a/harvesterplugins/applications/src/applicationsplugin.cpp	Tue Jul 06 14:17:22 2010 +0300
+++ b/harvesterplugins/applications/src/applicationsplugin.cpp	Wed Aug 18 09:49:49 2010 +0300
@@ -23,7 +23,7 @@
 #include <csearchdocument.h>
 #include <e32base.h>
 //#include <menu2internalcrkeys.h> //for KCRUidMenu
-#include <WidgetPropertyValue.h> // EBundleDisplayName 
+//#include <WidgetPropertyValue.h> // EBundleDisplayName 
 #include <centralrepository.h>
 #include <opensystemtrace.h> 
 #include "OstTraceDefinitions.h"
@@ -81,7 +81,7 @@
     if (iAsynchronizer)
         iAsynchronizer->CancelCallback();
     iApplicationServerSession.Close();
-    iWidgetRegistry.Close();
+    //iWidgetRegistry.Close();
     //delete iHiddenApplicationsRepository;
 	delete iAsynchronizer;
 	delete iNotifier;
@@ -94,7 +94,7 @@
     iAsynchronizer = CDelayedCallback::NewL( CActive::EPriorityIdle );
     iNotifier = CApaAppListNotifier::NewL( this, CActive::EPriorityHigh );
     //iHiddenApplicationsRepository = CRepository::NewL( KHiddenAppRepositoryUid );
-    User::LeaveIfError( iWidgetRegistry.Connect() );
+    //User::LeaveIfError( iWidgetRegistry.Connect() );
     }
 
 // -----------------------------------------------------------------------------
@@ -124,7 +124,8 @@
    	iAsynchronizer->Start( 0, this, KHarvestingDelay );
     }
 
-// -----------------------------------------------------------------------------
+//Removing Widget Registry support
+/* -----------------------------------------------------------------------------
 void CApplicationsPlugin::AddWidgetInfoL( CSearchDocument* aDocument, TUid aUid )
     {
     TBuf<KMaxFileName> temp;//we can reuse this.
@@ -145,7 +146,7 @@
     
     OstTraceExt1( TRACE_NORMAL, DUP1_CAPPLICATIONSPLUGIN_ADDWIDGETINFOL, "CApplicationsPlugin::AddWidgetInfoL;DisplayName=%S", &temp );
     CPIXLOGSTRING2("AddApplicationInfo(): DisplayName = %S ", &temp );
-    }
+    }*/
 
 // -----------------------------------------------------------------------------
 //This need not be a member function.
@@ -240,11 +241,19 @@
     //That way, if a client is interested in the UID field, he can choose to query it explicitly.
     document->AddFieldL(KMimeTypeField, KMimeTypeApplication, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized );
     document->AddFieldL(KApplicationFieldUid, docidString, CDocumentField::EStoreYes | CDocumentField::EIndexTokenized | CDocumentField::EAggregateNo );
-
-    if( iWidgetRegistry.IsWidget( aAppInfo.iUid  ) )
+#ifdef USE_HIGHLIGHTER    
+    TInt excerptLength = docidString.Length();
+    HBufC* excerpt = HBufC::NewL(excerptLength);
+    TPtr excerptPtr = excerpt->Des();
+    CleanupStack::PushL(excerpt);
+    document->AddExcerptL(excerptPtr);
+    CleanupStack::PopAndDestroy(excerpt);
+#endif
+    
+    /*if( iWidgetRegistry.IsWidget( aAppInfo.iUid  ) ) //Widget support
         AddWidgetInfoL( document, aAppInfo.iUid );
-    else
-        AddApplicationInfoL( document, aAppInfo );
+    else*/
+     AddApplicationInfoL( document, aAppInfo );
 
     TRAPD( error, iIndexer->AddL( *document ) );
     if( KErrNone == error )