Modify GetInfoValue method to use the PrivilegeInfo class
authorhb.min <hb.min@samsung.com>
Mon, 18 Mar 2013 13:29:28 +0000 (22:29 +0900)
committerhb.min <hb.min@samsung.com>
Mon, 18 Mar 2013 13:29:28 +0000 (22:29 +0900)
Change-Id: Ia7cefc58ba0faa42ba2c6f43ebdf93949e108d2b
Signed-off-by: hb.min <hb.min@samsung.com>
src/IstDetailForm.cpp

index dd017e8..810345d 100644 (file)
@@ -110,13 +110,16 @@ result
 DetailForm::GetInfoValue(int groupIndex, int itemIndex, String& name, String& description)
 {
        String value;
-       String privilege;
+       PrivilegeInfo* pPrivilege = null;
 
        TryReturn(groupIndex == 0, E_FAILURE, "Group Index Error");
-       privilege = dynamic_cast <String*>(__pPrivilegeList->GetAt(itemIndex))->GetPointer();
+       pPrivilege = dynamic_cast <PrivilegeInfo*>(__pPrivilegeList->GetAt(itemIndex));
 
-       name = PrivilegeInfo::GetName(privilege);
-       description = PrivilegeInfo::GetDescription(privilege);
+       if (pPrivilege != null)
+       {
+               name = pPrivilege->GetDisplayName();
+               description = pPrivilege->GetDescription();
+       }
 
        return E_SUCCESS;
 }