mds_plat/content_listing_framework_collection_manager_api/tsrc/src/CollectionManagerTestBlocks.cpp
changeset 28 c461c7fa72c2
parent 0 c53acadfccc6
equal deleted inserted replaced
25:8e4539ab1889 28:c461c7fa72c2
   469         return KErrUnknown;
   469         return KErrUnknown;
   470         }
   470         }
   471     
   471     
   472     const TInt itemCount( 500 );
   472     const TInt itemCount( 500 );
   473     CDesCArray* removeItemArray = new (ELeave) CDesCArrayFlat( itemCount );
   473     CDesCArray* removeItemArray = new (ELeave) CDesCArrayFlat( itemCount );
       
   474     CleanupStack::PushL( removeItemArray );
   474 
   475 
   475     for( TInt i = 0 ; i < itemCount ; ++i )
   476     for( TInt i = 0 ; i < itemCount ; ++i )
   476         {
   477         {
   477         TBuf<40> b;
   478         TBuf<40> b;
   478         b.Num( i );
   479         b.Num( i );
   482     
   483     
   483     TInt error( KErrNone );
   484     TInt error( KErrNone );
   484     TRAP( error, iCollectionManager->RemoveFromAllCollectionsL( *removeItemArray ) );
   485     TRAP( error, iCollectionManager->RemoveFromAllCollectionsL( *removeItemArray ) );
   485     if( error != KErrNotSupported && error != KErrNone )
   486     if( error != KErrNotSupported && error != KErrNone )
   486         {
   487         {
   487         delete removeItemArray;
   488         CleanupStack::PopAndDestroy( removeItemArray );
   488         removeItemArray = NULL;
   489         removeItemArray = NULL;
   489         return error;
   490         return error;
   490         }
   491         }
   491     
   492     
   492     delete removeItemArray;
   493     CleanupStack::PopAndDestroy( removeItemArray );
   493     removeItemArray = NULL;
   494     removeItemArray = NULL;
   494     
   495     
   495     _LIT( KMsg2, "Exit RemoveFromAllCollectionsL" );
   496     _LIT( KMsg2, "Exit RemoveFromAllCollectionsL" );
   496     iLog->Log( KMsg2 );  
   497     iLog->Log( KMsg2 );  
   497     RDebug::Print( KMsg2 );
   498     RDebug::Print( KMsg2 );