diff -r 2666d9724c76 -r d4f567ce2e7c predictivesearch/PcsAlgorithm/Algorithm2/src/CPsDataPluginInterface.cpp --- a/predictivesearch/PcsAlgorithm/Algorithm2/src/CPsDataPluginInterface.cpp Thu Jul 15 18:22:55 2010 +0300 +++ b/predictivesearch/PcsAlgorithm/Algorithm2/src/CPsDataPluginInterface.cpp Thu Aug 19 09:41:07 2010 +0300 @@ -15,6 +15,7 @@ * */ + // INCLUDE FILES #include "CPsDataPluginInterface.h" #include "CPsDataPlugin.h" @@ -109,7 +110,8 @@ // Instantiate plugins for all impUIds by calling // InstantiatePlugInFromImpUidL - for ( TInt i=0; iIsDataStoresSupportedL(aDataStore)) { @@ -200,8 +202,8 @@ { PRINT ( _L("Enter CPsDataPluginInterface::GetAllSupportedDataStoresL") ); - - for ( TInt idx = 0; idx < iPsDataPluginInstances.Count(); idx++ ) + const TInt instancesCount = iPsDataPluginInstances.Count(); + for ( TInt idx = 0; idx < instancesCount; idx++ ) { iPsDataPluginInstances[idx]->GetSupportedDataStoresL(aDataStores); } @@ -219,20 +221,23 @@ PRINT ( _L("Enter CPsDataPluginInterface::GetAllSupportedDataStoresL") ); - for ( TInt idx = 0; idx < iPsDataPluginInstances.Count(); idx++ ) - { - RPointerArray aDataStores; - iPsDataPluginInstances[idx]->GetSupportedDataStoresL(aDataStores); + const TInt instancesCount = iPsDataPluginInstances.Count(); + for ( TInt idx = 0; idx < instancesCount; idx++ ) + { + RPointerArray dataStores; + CleanupClosePushL( dataStores ); + iPsDataPluginInstances[idx]->GetSupportedDataStoresL(dataStores); - for( TInt i(0); iCompare(aUri) == 0) + const TInt dataStoresCount = dataStores.Count(); + for ( TInt i(0); i < dataStoresCount; i++) + { + if ( dataStores[i]->Compare(aUri) == 0) { iPsDataPluginInstances[idx]->GetSupportedDataFieldsL(aDataFields); break; - } + } } - aDataStores.Reset(); + CleanupStack::PopAndDestroy( &dataStores ); // Close } PRINT ( _L("End CPsDataPluginInterface::GetAllSupportedDataStoresL") );