Fix Qt5 decimal separator bug

Always use '.' as the decimal separator in the GUI, because we
call setlocale(LC_NUMERIC, "C") in setLocale() (GuiApplication.cpp).
This commit is contained in:
Enrico Forestieri 2013-07-26 20:52:44 +02:00
parent b885b80bc0
commit 92863de517

View File

@ -179,7 +179,7 @@ string widgetToDoubleStr(QLineEdit const * input)
void doubleToWidget(QLineEdit * input, double const & value, char f, int prec)
{
QLocale loc;
QLocale loc("C");
loc.setNumberOptions(QLocale::OmitGroupSeparator);
input->setText(loc.toString(value, f, prec));
}