--- a/stifui/avkon/stifui/src/StartCasesView.cpp Tue Apr 27 16:38:40 2010 +0300
+++ b/stifui/avkon/stifui/src/StartCasesView.cpp Tue May 11 16:14:15 2010 +0300
@@ -251,7 +251,7 @@
for (i = 0; i < moduleCount; i++)
{
//item.iText = modules[i].iModuleName;
- item.iText = modules[i];
+ item.iText.Copy( modules[i].Left( item.iText.MaxLength() ) ) ;
aMenuPane->AddMenuItemL(item);
item.iCommandId++; // command IDs 0x1000 - 0x1FFF are reserved for modules in hrh file
}
@@ -284,7 +284,7 @@
for (i = 0; i < testCaseFileCount; i++)
{
- item.iText = testCaseFiles[i];
+ item.iText.Copy( testCaseFiles[i].Left( item.iText.MaxLength() ) );
// If thereīs no test case file, donīt add item to menu.
if ( testCaseFiles[i].Length() > 0 )
{
@@ -372,26 +372,18 @@
CAknListQueryDialog* startDialog = new (ELeave) CAknListQueryDialog(&selectedItem);
if ( startDialog->ExecuteLD(R_START_TESTCASE_LIST_QUERY) )
{
- RRefArray<CTestInfo> testInfo;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCases( testInfo );
- if( KErrNone != ret )
- {
- testInfo.Reset();
- testInfo.Close();
- User::Leave( ret );
- }
- TInt testCaseNumber = iCurrentTestCase;
-
+ CTestInfo* testCaseInfo = iContainer->SelectedTestCaseInfo();
+
+ User::LeaveIfNull( testCaseInfo );
+
TInt testCaseIndex( 0 );
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartTestCase( testInfo[testCaseNumber], testCaseIndex );
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartTestCase( *testCaseInfo, testCaseIndex );
if( KErrNone != ret )
{
User::Leave( ret );
}
- testInfo.Reset();
- testInfo.Close();
// Increment the counter value
((CAppUIAppUi*)AppUi())->iUIStoreHandler->iExecutedTestCaseCount++;
@@ -426,23 +418,16 @@
CAknListQueryDialog* startDialog = new (ELeave) CAknListQueryDialog(&selectedItem);
if ( startDialog->ExecuteLD(R_START_MULTIPLE_TESTCASES_LIST_QUERY) )
{
- RRefArray<CTestInfo> testInfo;
- CleanupClosePushL( testInfo );
-
ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->CreateTestSet( KTempSet );
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCases( testInfo );
- if( KErrNone != ret )
- {
- testInfo.Reset();
- testInfo.Close();
- User::Leave( ret );
- }
+ User::LeaveIfError( ret );
for( i = 0; i < aSelectedIndexes.Count(); i++ )
{
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->AddToTestSet( KTempSet,
- testInfo[ aSelectedIndexes[i] ] );
+ CTestInfo* testCaseInfo = iContainer->TestCaseInfo( aSelectedIndexes[i] );
+ User::LeaveIfNull( testCaseInfo );
+
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->AddToTestSet( KTempSet, *testCaseInfo );
if( KErrNone != ret )
{
User::Leave( ret );
@@ -466,8 +451,6 @@
}
ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->RemoveTestSet( KTempSet );
-
- CleanupStack::PopAndDestroy();
}
}