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
parent
df276fb29f
commit
92a9a18b5d
|
|
@ -816,7 +816,7 @@ QDateTimeParser::parseSection(const QDateTime ¤tValue, 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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue