Fixed broken formula when for system locale thousand separator is space.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-02-25 21:21:48 +02:00
parent f2ee4cfd35
commit 9219b05a5b

View File

@ -889,7 +889,8 @@ QString VTranslateVars::FormulaToUser(const QString &formula) const
} }
loc = QLocale::system();// To user locale loc = QLocale::system();// To user locale
const QString dStr = loc.toString(d);// Number string in user locale QString dStr = loc.toString(d);// Number string in user locale
dStr.replace(" ", ""); // Remove thousand separator
newFormula.replace(nKeys.at(i), nValues.at(i).length(), dStr); newFormula.replace(nKeys.at(i), nValues.at(i).length(), dStr);
const int bias = nValues.at(i).length() - dStr.length(); const int bias = nValues.at(i).length() - dStr.length();
if (bias != 0) if (bias != 0)