summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qspinbox.cpp
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2012-01-27 19:04:42 +0000
committerQt by Nokia <qt-info@nokia.com>2012-02-05 17:49:56 +0100
commit29c4a27a94d6f0dc9d91227d99bab7c2f55710db (patch)
treecd66bb046981558a18d999770df90201b3cb946a /src/widgets/widgets/qspinbox.cpp
parent1e3833bed8a661ee8ae284188a23bd0ffc3bed85 (diff)
SIC: QLocale: Remove base argument from conversion to number api
As discussed on list and approved by Lars and Thiago. Remove the option to use QLocale to convert strings to non-decimal numbers as they are not localised and the api is available in QString. Change-Id: Ib810505ba86fb08ad23571b39f1520e86fde6787 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/widgets/qspinbox.cpp')
-rw-r--r--src/widgets/widgets/qspinbox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index 77c760d1e3..ee94368690 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -990,11 +990,11 @@ QVariant QSpinBoxPrivate::validateAndInterpret(QString &input, int &pos,
state = QValidator::Invalid; // special-case -0 will be interpreted as 0 and thus not be invalid with a range from 0-100
} else {
bool ok = false;
- num = locale.toInt(copy, &ok, 10);
+ num = locale.toInt(copy, &ok);
if (!ok && copy.contains(locale.groupSeparator()) && (max >= 1000 || min <= -1000)) {
QString copy2 = copy;
copy2.remove(locale.groupSeparator());
- num = locale.toInt(copy2, &ok, 10);
+ num = locale.toInt(copy2, &ok);
}
QSBDEBUG() << __FILE__ << __LINE__<< "num is set to" << num;
if (!ok) {