photosgallery/viewframework/commandhandlers/commoncommandhandlers/tsrc/ut_propertycommandhandlers/src/ut_propertycommandhandlers.cpp
branchRCL_3
changeset 18 bcb43dc84c44
parent 13 71da52165949
equal deleted inserted replaced
14:ce1c7ad1f18b 18:bcb43dc84c44
    41     TInt i = Index(aAttribute);
    41     TInt i = Index(aAttribute);
    42     if (KErrNotFound != i)
    42     if (KErrNotFound != i)
    43         {
    43         {
    44         // Replace the existing value
    44         // Replace the existing value
    45         TValue& value = iValues[i];
    45         TValue& value = iValues[i];
    46 		// COMMENTED OUT SINCE NOT EXPORTED 
       
    47 		//Delete(value);
       
    48         
       
    49         value.iValue = ptr; // Takes ownership
    46         value.iValue = ptr; // Takes ownership
    50         value.iType = EMPXTypeTObject;
    47         value.iType = EMPXTypeTObject;
    51         }
    48         }
    52     else
    49     else
    53         {
    50         {
   263 	}
   260 	}
   264 
   261 
   265 UT_propertycommandhandlers* UT_propertycommandhandlers::NewL()
   262 UT_propertycommandhandlers* UT_propertycommandhandlers::NewL()
   266     {
   263     {
   267     UT_propertycommandhandlers* self = UT_propertycommandhandlers::NewLC();
   264     UT_propertycommandhandlers* self = UT_propertycommandhandlers::NewLC();
   268     CleanupStack::Pop();
   265     CleanupStack::Pop( self );
   269 
       
   270     return self;
   266     return self;
   271     }
   267     }
   272 
   268 
   273 UT_propertycommandhandlers* UT_propertycommandhandlers::NewLC()
   269 UT_propertycommandhandlers* UT_propertycommandhandlers::NewLC()
   274     {
   270     {
   275     UT_propertycommandhandlers* self = new( ELeave ) UT_propertycommandhandlers();
   271     UT_propertycommandhandlers* self = new( ELeave ) UT_propertycommandhandlers();
   276     CleanupStack::PushL( self );
   272     CleanupStack::PushL( self );
   277 
       
   278     self->ConstructL();
   273     self->ConstructL();
   279 
       
   280     return self;
   274     return self;
   281     }
   275     }
   282   
   276   
   283     
   277     
   284 // Destructor (virtual by CBase)
   278 // Destructor (virtual by CBase)
   303 
   297 
   304 
   298 
   305 
   299 
   306 void UT_propertycommandhandlers::SetupL(  )
   300 void UT_propertycommandhandlers::SetupL(  )
   307     {
   301     {
   308     //MMPXCollectionUtility* collectionUtility = MMPXCollectionUtility::NewL(NULL, KMcModeDefault);
       
   309     //CMPXCollectionPath* path ;//= collectionUtility->Collection().PathL();
       
   310 		//iML = MGlxMediaList::InstanceL(*path,NULL);
       
   311 	iMediaList = new (ELeave) _CGlxTestMediaList;
   302 	iMediaList = new (ELeave) _CGlxTestMediaList;
   312 	iMediaList->AppendL(0, ETrue);
   303 	iMediaList->AppendL(0, ETrue);
   313 	iMediaList->AppendL(1, ETrue);
   304 	iMediaList->AppendL(1, ETrue);
   314 	iMediaList->AppendL(2, ETrue);
   305 	iMediaList->AppendL(2, ETrue);
   315 	iMediaList->AppendL(3, ETrue);
   306 	iMediaList->AppendL(3, ETrue);