From: Kevron Rees Date: Fri, 23 Aug 2013 19:35:11 +0000 (-0700) Subject: fixed lowerCamelCase issue for get() calls X-Git-Tag: submit/tizen/20130823.201329^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0f617a85750a12b3e1ee47e1b8723bb50fad69f;p=profile%2Fivi%2Fwrt-plugins-ivi.git fixed lowerCamelCase issue for get() calls --- diff --git a/packaging/wrt-plugins-ivi.spec b/packaging/wrt-plugins-ivi.spec index 956d6d4..1c4e626 100644 --- a/packaging/wrt-plugins-ivi.spec +++ b/packaging/wrt-plugins-ivi.spec @@ -1,6 +1,6 @@ Name: wrt-plugins-ivi Summary: JavaScript plugins for WebRuntime for IVI -Version: 0.8.0 +Version: 0.8.1 Release: 1 Group: Development/Libraries License: Apache License, Version 2.0 diff --git a/src/Vehicle/JSVehicle.cpp b/src/Vehicle/JSVehicle.cpp index b544102..58e0b68 100644 --- a/src/Vehicle/JSVehicle.cpp +++ b/src/Vehicle/JSVehicle.cpp @@ -145,6 +145,10 @@ JSValueRef JSVehicle::get(JSContextRef context, if(json.str() != "{") json<<","; std::string key = (*itr).first; + + /// make key lowerCamelCase: + std::transform(key.begin(), key.begin()+1, key.begin(), ::tolower); + GVariant* var = (*itr).second; gsize size; @@ -314,7 +318,7 @@ JSValueRef JSVehicle::set(JSContextRef context, LoggerD("value type: " << JSValueGetType(context, val)); - /// make sure the property is UpperCamelCase because that's how it look in AMB + /// make sure the property is UpperCamelCase because that's how it looks in AMB std::transform(result.begin(), result.begin()+1, result.begin(), ::toupper); objectMap[result] = val;