From 00ffd16d367a19f958149b3b4ec5f5c5e6b71f9b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 27 May 2009 09:56:16 +0200 Subject: Do not use the locale in QDoubleSpinBoxPrivate::round We had a report from a customer saying this breaks if the decimal separator is the same as the group separator. This is not really something we want to support, but because this fix is easy and cleanup the code I decided to fix it. Reviewed-by: Thierry Task-number: 253962 --- src/gui/widgets/qspinbox.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gui/widgets/qspinbox.cpp b/src/gui/widgets/qspinbox.cpp index b7426f0..f12946c 100644 --- a/src/gui/widgets/qspinbox.cpp +++ b/src/gui/widgets/qspinbox.cpp @@ -1254,9 +1254,7 @@ QVariant QDoubleSpinBoxPrivate::valueFromText(const QString &f) const double QDoubleSpinBoxPrivate::round(double value) const { - Q_Q(const QDoubleSpinBox); - const QString strDbl = q->locale().toString(value, 'f', decimals); - return q->locale().toDouble(strDbl); + return QString::number(value, 'f', decimals).toDouble(); } -- cgit v0.12