From 3359b29c99581f52acf033489ad35884a01ccac8 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Tue, 3 Dec 2019 11:13:42 +0100 Subject: QDoubleValidator: Fix thousand separator handling QDoubleValidator would accept "1,23" as valid in a locale which has ',' as a thousand separator. However, it should have been Intermediate instead, as there is still one digit missing. Fixes: QTBUG-75110 Change-Id: I6de90f0b6f1eae95dc8dfc8e5f9658e482e46db3 Reviewed-by: Ulf Hermann Reviewed-by: Edward Welbourne --- src/gui/util/qvalidator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/util/qvalidator.cpp b/src/gui/util/qvalidator.cpp index 2237b016e9..54cbb28ffa 100644 --- a/src/gui/util/qvalidator.cpp +++ b/src/gui/util/qvalidator.cpp @@ -688,7 +688,7 @@ QValidator::State QDoubleValidatorPrivate::validateWithLocale(QString &input, QL return QValidator::Invalid; bool ok = false; - double i = buff.toDouble(&ok); // returns 0.0 if !ok + double i = locale.toDouble(input, &ok); // returns 0.0 if !ok if (i == qt_qnan()) return QValidator::Invalid; if (!ok) -- cgit v1.2.3