Count digits in QDateTimeParser::parseSection()'s numeric fields

Assuming everything up to the first space is a digit is not sound.

Change-Id: Iab5bb134c8e3299da726625c53b6a9b23f09dbb4
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Edward Welbourne 2020-08-28 09:26:49 +02:00
parent df276fb29f
commit 92a9a18b5d
1 changed files with 1 additions and 1 deletions

View File

@ -816,7 +816,7 @@ QDateTimeParser::parseSection(const QDateTime &currentValue, int sectionIndex,
result = ParsedSection(Intermediate);
} else {
for (int i = 0; i < sectiontextSize; ++i) {
if (sectionTextRef.at(i).isSpace())
if (!sectionTextRef.at(i).isDigit())
sectiontextSize = i; // which exits the loop
}