diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qdatetimeparser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qdatetimeparser.cpp b/src/corelib/tools/qdatetimeparser.cpp index 99a324a728..3cf926ca8f 100644 --- a/src/corelib/tools/qdatetimeparser.cpp +++ b/src/corelib/tools/qdatetimeparser.cpp @@ -494,15 +494,15 @@ bool QDateTimeParser::parseFormat(const QString &newFormat) } if ((newDisplay & (AmPmSection|Hour12Section)) == Hour12Section) { - const int max = newSectionNodes.size(); - for (int i=0; i<max; ++i) { + const int count = newSectionNodes.size(); + for (int i = 0; i < count; ++i) { SectionNode &node = newSectionNodes[i]; if (node.type == Hour12Section) node.type = Hour24Section; } } - if (index < newFormat.size()) { + if (index < max) { appendSeparator(&newSeparators, newFormat, index, index - max, lastQuote); } else { newSeparators.append(QString()); |