diff -r 2580314736af -r 2669f8761a99 XDMEngine/XdmSettingsApi/src/XdmSettingsApi.cpp --- a/XDMEngine/XdmSettingsApi/src/XdmSettingsApi.cpp Thu Aug 19 10:19:02 2010 +0300 +++ b/XDMEngine/XdmSettingsApi/src/XdmSettingsApi.cpp Tue Aug 31 15:35:50 2010 +0300 @@ -31,11 +31,11 @@ EXPORT_C TInt TXdmSettingsApi::CreateCollectionL( const CXdmSettingsCollection& aCollection ) { #ifdef _DEBUG - WriteToLog( _L8( "TXdmSettingsApi::CreateCollectionL() - begin" ) ); + WriteToLog( _L8( "TXdmSettingsApi::CreateCollectionL()" ) ); #endif TInt error = KErrArgument; CRepository* repository = CRepository::NewL( KCRUidXdmEngine ); - CleanupStack::PushL( repository ); // CS: 1 + CleanupStack::PushL( repository ); TInt row = LastRow( repository ); TInt count = aCollection.Count(); __ASSERT_DEBUG( count > 0, User::Leave( KErrArgument ) ); @@ -364,10 +364,8 @@ EXPORT_C CDesCArray* TXdmSettingsApi::CollectionNamesLC( RArray& aSettingIds ) { #ifdef _DEBUG - WriteToLog( _L8( "TXdmSettingsApi::CollectionNamesLC() - begin" ) ); + WriteToLog( _L8( "TXdmSettingsApi::CollectionNamesL()" ) ); #endif - TInt nameError = KErrNone; - TInt idError = KErrNone; TInt error = KErrNone; CDesCArrayFlat* propertySet = new ( ELeave ) CDesCArrayFlat( 10 ); CleanupStack::PushL( propertySet ); @@ -392,9 +390,9 @@ identifier.Zero(); name = HBufC::NewLC( NCentralRepositoryConstants::KMaxUnicodeStringLength ); TPtr desc( name->Des()); - nameError = repository->Get( nameKeys[i], desc ); - idError = repository->Get( idKeys[i], identifier ); - if( idError == KErrNone && desc.Length() > 0 && identifier.Length() > 0 ) + error = repository->Get( nameKeys[i], desc ); + error = repository->Get( idKeys[i], identifier ); + if( error == KErrNone && desc.Length() > 0 && identifier.Length() > 0 ) { #ifdef _DEBUG HBufC8* eightName = HBufC8::NewLC( desc.Length() ); @@ -406,21 +404,18 @@ propertySet->AppendL( desc ); TLex id( identifier ); error = id.Val( numId ); - aSettingIds.AppendL( error == KErrNone ? numId : error ); + aSettingIds.Append( error == KErrNone ? numId : error ); } else { #ifdef _DEBUG - WriteToLog( _L8( " Fetching of the name no. %d failed with idError:%d & nameError:%d" ), i, idError, nameError ); + WriteToLog( _L8( " Fetching of the name no. %d failed with: %d" ), i, error ); #endif } CleanupStack::PopAndDestroy(); //name } } CleanupStack::PopAndDestroy( 3 ); //idKeys, nameKeys, repository -#ifdef _DEBUG - WriteToLog( _L8( "TXdmSettingsApi::CollectionNamesLC() - end" ) ); -#endif return propertySet; } @@ -523,7 +518,6 @@ User::Leave( error ); } CleanupStack::PopAndDestroy( 2 ); //keys, repository - WriteToLog( _L8( " Return: %S" ), buf ); return buf; }