contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/src/TestSuiteInputData.cpp
--- a/contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/src/TestSuiteInputData.cpp Wed Sep 15 11:56:55 2010 +0300
+++ b/contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/src/TestSuiteInputData.cpp Wed Oct 13 14:15:33 2010 +0300
@@ -22,24 +22,6 @@
#include "pstestcontactshandler.h"
#include "psclienttestsuitedefs.h"
#include <vpbkeng.rsg>
-#include <f32file.h>
-#include <CHARCONV.H>
-
-void CTestSuiteInputData::ConvUtf2UniL( const TDesC& aOriginal, TDes& aRes )
- {
- HBufC8* buf8 = HBufC8::NewLC( aOriginal.Length() * 2 );
- buf8->Des().Copy( aOriginal );
- TPtrC8 str = buf8->Des();
-
- HBufC* InfoText = CnvUtfConverter::ConvertToUnicodeFromUtf8L( str );
- CleanupStack::PushL( InfoText );
- TPtr16 ptr = InfoText->Des();
-
- aRes.Zero();
- aRes.Copy( ptr );
-
- CleanupStack::PopAndDestroy( 2 );
- }
// ============================== MEMBER FUNCTIONS ============================
@@ -440,14 +422,9 @@
j++;
TPtrC16 dataPtr = aInput.Mid(Startpos ,j - Startpos);
-
- HBufC* buf = dataPtr.AllocLC();
- TPtr uniPtr = buf->Des();
- ConvUtf2UniL( dataPtr, uniPtr);
-
+
// Add data to the class
- tempcacheData->data.Append(uniPtr.AllocL());
- CleanupStack::PopAndDestroy();
+ tempcacheData->data.Append(dataPtr.AllocL());
commaPos = j ;
j++;
@@ -571,16 +548,12 @@
j++;
TPtrC16 dataPtr = aInput.Mid(Startpos ,j - Startpos);
- HBufC* buf = dataPtr.AllocLC();
- TPtr uniPtr = buf->Des();
- ConvUtf2UniL( dataPtr, uniPtr);
// Add data to the output
- HBufC* tempData = uniPtr.AllocL();
+ HBufC* tempData = dataPtr.AllocL();
aSeparatedData.Append(tempData);
SeparatorPos = j;
j++;
- CleanupStack::PopAndDestroy();
}
}
@@ -873,11 +846,7 @@
// -----------------------------------------------------------------------------
void CTestSuiteInputData::ParseInputInputSearchStringL(TDesC& aInput)
{
- HBufC* buf = aInput.AllocLC();
- TPtr uniPtr = buf->Des();
- ConvUtf2UniL( aInput, uniPtr);
- iInputSearchString = uniPtr.AllocL();
- CleanupStack::PopAndDestroy();
+ iInputSearchString = aInput.AllocL();
}
// -----------------------------------------------------------------------------
@@ -981,13 +950,8 @@
HBufC* temp2 = aInput.Right(len - 1).AllocL();
ParseInputForContactsDataL(*temp2,0);
- HBufC* buf = gropName->AllocLC();
- TPtr uniPtr = buf->Des();
- ConvUtf2UniL( gropName->Des(), uniPtr);
-
//Add the group
- iContactHandler->AddGroupL(*buf);
- CleanupStack::PopAndDestroy();
+ iContactHandler->AddGroupL(*gropName);
CActiveScheduler :: Start();
//Create Contacts
@@ -1000,11 +964,7 @@
// -----------------------------------------------------------------------------
void CTestSuiteInputData::ParseInputForSearchWithinGroupL(TDesC& aInput)
{
- HBufC* buf = aInput.AllocLC();
- TPtr uniPtr = buf->Des();
- ConvUtf2UniL( aInput, uniPtr);
- iGroupToBeSearched = uniPtr.AllocL();
- CleanupStack::PopAndDestroy();
+ iGroupToBeSearched = aInput.AllocL();
}
// -----------------------------------------------------------------------------