--- a/landmarks/locationlandmarks/tsrc/LandmarkTestModule/src/FT_CPosTp150.cpp Fri Jul 23 19:40:48 2010 +0530
+++ b/landmarks/locationlandmarks/tsrc/LandmarkTestModule/src/FT_CPosTp150.cpp Fri Aug 06 19:34:22 2010 +0530
@@ -57,17 +57,14 @@
{
iLog->Log(_L("CloseTest"));
- delete iEncoderBuffer;
- iEncoderBuffer = NULL;
+
iLandmarks.ResetAndDestroy();
iLandmarks.Close();
- delete iDatabase;
- iDatabase=NULL;
+
- delete iLandmarkEncoder;
- iLandmarkEncoder = NULL;
+
delete iLandmarkParser;
iLandmarkParser = NULL;
@@ -75,17 +72,7 @@
delete iOperation;
iOperation = NULL;
- TRAPD(err, RemoveGlobalCategoriesL());
- if (err != KErrNone && err != KErrNotFound)
- {
- HBufC* buf = HBufC::NewLC( 128 );
- TPtr buffer = buf->Des();
-
- buffer.Format(_L("RemoveGlobalCategoriesL leaved with %d"), err);
- iLog->Log( buffer );
-
- CleanupStack::PopAndDestroy( buf );
- }
+
iLog->Log(_L("CloseTest Done"));
}
@@ -100,32 +87,9 @@
{
BaflUtils::EnsurePathExistsL( iFileSession, KKMZFile );
- // Use same lm db as in composite search test
- iDatabase = UseCompositeLandmarksDbFileL();
- if (iDatabase->IsInitializingNeeded())
- {
- ExecuteAndDeleteLD(iDatabase->InitializeL());
- }
-
// Delete the trace file
DeleteFileL(KFileTrace);
- delete iDatabase;
- iDatabase = NULL;
-
- iDatabase = CPosLandmarkDatabase::OpenL();
-
- if (iDatabase->IsInitializingNeeded())
- {
- ExecuteAndDeleteLD(iDatabase->InitializeL());
- }
-
- // Do reset so that global categories are included
- CPosLmCategoryManager* categoryManager = CPosLmCategoryManager::NewL(*iDatabase);
- CleanupStack::PushL(categoryManager);
-
- ExecuteAndDeleteLD(categoryManager->ResetGlobalCategoriesL());
- CleanupStack::PopAndDestroy(categoryManager);
HBufC8* emptyBuffer=NULL;