From 7abb90a70aed97c665430eb1e9f174dce26addd4 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Fri, 29 Apr 2016 15:50:11 +0300 Subject: QDateTimeParser: proper construction of QString ... with known size and known char by corresponding ctor. Don't use fill() for this case. Change-Id: I475a0655132ecbb40b1eac919309597b2560e71b Reviewed-by: Edward Welbourne Reviewed-by: Marc Mutz --- src/corelib/tools/qdatetimeparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib') diff --git a/src/corelib/tools/qdatetimeparser.cpp b/src/corelib/tools/qdatetimeparser.cpp index fbf91fe8a4..9b0f293d59 100644 --- a/src/corelib/tools/qdatetimeparser.cpp +++ b/src/corelib/tools/qdatetimeparser.cpp @@ -847,7 +847,7 @@ int QDateTimeParser::parseSection(const QDateTime ¤tValue, int sectionInde if (skipToNextSection(sectionIndex, currentValue, digitsStr)) { state = Acceptable; const int missingZeroes = sectionmaxsize - digitsStr.size(); - text.insert(index, QString().fill(QLatin1Char('0'), missingZeroes)); + text.insert(index, QString(missingZeroes, QLatin1Char('0'))); used = sectionmaxsize; cursorPosition += missingZeroes; ++(const_cast(this)->sectionNodes[sectionIndex].zeroesAdded); -- cgit v1.2.3