calendarui/editors/src/calendbfield.cpp
branchRCL_3
changeset 30 d68a4b5d5885
parent 20 21239b3bcd78
child 60 96907930389d
equal deleted inserted replaced
27:55d60436f00b 30:d68a4b5d5885
   302     TRACE_ENTRY_POINT;
   302     TRACE_ENTRY_POINT;
   303     
   303     
   304     RPointerArray<CCalCalendarInfo> calendarInfoList; 
   304     RPointerArray<CCalCalendarInfo> calendarInfoList; 
   305     iServices->GetAllCalendarInfoL(calendarInfoList);
   305     iServices->GetAllCalendarInfoL(calendarInfoList);
   306     CleanupClosePushL( calendarInfoList );
   306     CleanupClosePushL( calendarInfoList );
   307     TInt pos = iDbNamesTextValues->CurrentValueIndex();
   307     TInt pos;
       
   308     if( calendarInfoList.Count() == 1 )
       
   309         {
       
   310          pos = 0;
       
   311         }
       
   312     else
       
   313         {
       
   314         pos = iDbNamesTextValues->CurrentValueIndex();
       
   315         }
       
   316     
   308     HBufC* calendarFileName = calendarInfoList[pos]->FileNameL().AllocLC();
   317     HBufC* calendarFileName = calendarInfoList[pos]->FileNameL().AllocLC();
   309     iCurrentColId = iServices->SessionL(*calendarFileName).CollectionIdL();
   318     iCurrentColId = iServices->SessionL(*calendarFileName).CollectionIdL();
   310     CleanupStack::PopAndDestroy(calendarFileName);
   319     CleanupStack::PopAndDestroy(calendarFileName);
   311     CleanupStack::PopAndDestroy( &calendarInfoList );
   320     CleanupStack::PopAndDestroy( &calendarInfoList );
   312 
   321