summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-05-27 07:56:16 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-05-27 08:30:53 (GMT)
commit00ffd16d367a19f958149b3b4ec5f5c5e6b71f9b (patch)
treeec6c4ef4a013fdb8db8c7420b317c49290495fce /src/gui/widgets
parent0ea19cf01e2381969a8b8ce8cdaffe9ce873d3a9 (diff)
downloadQt-00ffd16d367a19f958149b3b4ec5f5c5e6b71f9b.zip
Qt-00ffd16d367a19f958149b3b4ec5f5c5e6b71f9b.tar.gz
Qt-00ffd16d367a19f958149b3b4ec5f5c5e6b71f9b.tar.bz2
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
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qspinbox.cpp4
1 files changed, 1 insertions, 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();
}