From 721b02cfab06db89910e75014f6b17134508f871 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Sun, 25 Jan 2015 11:26:16 -0600 Subject: [PATCH] Fixed ratings mysteriously not working on certain locales (e.g. German). --- es-app/src/components/RatingComponent.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/es-app/src/components/RatingComponent.cpp b/es-app/src/components/RatingComponent.cpp index aa09e7044..12f39a309 100644 --- a/es-app/src/components/RatingComponent.cpp +++ b/es-app/src/components/RatingComponent.cpp @@ -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()