OSDN Git Service

mark QLatin1Char object as static in QDateTimeParser::parse()
authorIvailo Monev <xakepa10@gmail.com>
Fri, 18 Jun 2021 17:11:23 +0000 (20:11 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Fri, 18 Jun 2021 17:11:23 +0000 (20:11 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/tools/qdatetime.cpp

index e28bb8d..048fbff 100644 (file)
@@ -4605,7 +4605,7 @@ QDateTimeParser::StateNode QDateTimeParser::parse(QString &input, int &cursorPos
 end:
     if (newCurrentValue.isValid()) {
         if (context != FromString && state != Invalid && newCurrentValue < minimum) {
-            const QLatin1Char space(' ');
+            static const QLatin1Char space(' ');
             if (Q_UNLIKELY(newCurrentValue >= minimum))
                 qWarning("QDateTimeParser::parse Internal error 3 (%s %s)",
                          qPrintable(newCurrentValue.toString()), qPrintable(minimum.toString()));