Fixed ratings mysteriously not working on certain locales (e.g. German).

This commit is contained in:
Aloshi 2015-01-25 11:26:16 -06:00
parent f79121cd72
commit 721b02cfab

View file

@ -31,7 +31,11 @@ void RatingComponent::setValue(const std::string& value)
std::string RatingComponent::getValue() const
{
return std::to_string((long double)mValue);
// do not use std::to_string here as it will use the current locale
// and that sometimes encodes decimals as commas
std::stringstream ss;
ss << mValue;
return ss.str();
}
void RatingComponent::onSizeChanged()