diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-28 01:00:39 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-01-28 14:14:20 +0000 |
commit | 558fc903acc610769279da2737ad679aa9fd728d (patch) | |
tree | ebe36deb140e47ca32fea9b0753cde06f465a0fa /src/corelib/time/qdatetimeparser.cpp | |
parent | 089d54f06ff327f5212cb08fdbcb540066357dd5 (diff) | |
parent | be8c257da9a264994243c120231965ff0008ef09 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
src/corelib/io/qsettings.cpp
src/corelib/kernel/qvariant.cpp
src/corelib/serialization/qjsoncbor.cpp
src/corelib/serialization/qjsonvalue.cpp
src/corelib/tools/tools.pri
src/gui/image/qimage.cpp
src/gui/kernel/qguivariant.cpp
src/widgets/kernel/qshortcut.cpp
tests/auto/tools/moc/allmocs_baseline_in.json
tests/auto/tools/moc/tst_moc.cpp
src/opengl/qglframebufferobject.cpp
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Leander Beernaert <leander.beernaert@qt.io>
Change-Id: Ie7f5fa646c607fe70c314bf7195f7578ded1d271
Diffstat (limited to 'src/corelib/time/qdatetimeparser.cpp')
-rw-r--r-- | src/corelib/time/qdatetimeparser.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/corelib/time/qdatetimeparser.cpp b/src/corelib/time/qdatetimeparser.cpp index 31d8e6cc20..70460ae632 100644 --- a/src/corelib/time/qdatetimeparser.cpp +++ b/src/corelib/time/qdatetimeparser.cpp @@ -425,7 +425,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat) switch (sect) { case 'H': case 'h': - if (parserType != QVariant::Date) { + if (parserType != QMetaType::QDate) { const Section hour = (sect == 'h') ? Hour12Section : Hour24Section; const SectionNode sn = { hour, i - add, countRepeat(newFormat, i, 2), 0 }; newSectionNodes.append(sn); @@ -436,7 +436,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat) } break; case 'm': - if (parserType != QVariant::Date) { + if (parserType != QMetaType::QDate) { const SectionNode sn = { MinuteSection, i - add, countRepeat(newFormat, i, 2), 0 }; newSectionNodes.append(sn); appendSeparator(&newSeparators, newFormat, index, i - index, lastQuote); @@ -446,7 +446,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat) } break; case 's': - if (parserType != QVariant::Date) { + if (parserType != QMetaType::QDate) { const SectionNode sn = { SecondSection, i - add, countRepeat(newFormat, i, 2), 0 }; newSectionNodes.append(sn); appendSeparator(&newSeparators, newFormat, index, i - index, lastQuote); @@ -457,7 +457,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat) break; case 'z': - if (parserType != QVariant::Date) { + if (parserType != QMetaType::QDate) { const SectionNode sn = { MSecSection, i - add, countRepeat(newFormat, i, 3) < 3 ? 1 : 3, 0 }; newSectionNodes.append(sn); appendSeparator(&newSeparators, newFormat, index, i - index, lastQuote); @@ -468,7 +468,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat) break; case 'A': case 'a': - if (parserType != QVariant::Date) { + if (parserType != QMetaType::QDate) { const bool cap = (sect == 'A'); const SectionNode sn = { AmPmSection, i - add, (cap ? 1 : 0), 0 }; newSectionNodes.append(sn); @@ -482,7 +482,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat) } break; case 'y': - if (parserType != QVariant::Time) { + if (parserType != QMetaType::QTime) { const int repeat = countRepeat(newFormat, i, 4); if (repeat >= 2) { const SectionNode sn = { repeat == 4 ? YearSection : YearSection2Digits, @@ -496,7 +496,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat) } break; case 'M': - if (parserType != QVariant::Time) { + if (parserType != QMetaType::QTime) { const SectionNode sn = { MonthSection, i - add, countRepeat(newFormat, i, 4), 0 }; newSectionNodes.append(sn); newSeparators.append(unquote(newFormat.midRef(index, i - index))); @@ -506,7 +506,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat) } break; case 'd': - if (parserType != QVariant::Time) { + if (parserType != QMetaType::QTime) { const int repeat = countRepeat(newFormat, i, 4); const Section sectionType = (repeat == 4 ? DayOfWeekSectionLong : (repeat == 3 ? DayOfWeekSectionShort : DaySection)); @@ -519,7 +519,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat) } break; case 't': - if (parserType != QVariant::Time) { + if (parserType != QMetaType::QTime) { const SectionNode sn = { TimeZoneSection, i - add, countRepeat(newFormat, i, 4), 0 }; newSectionNodes.append(sn); appendSeparator(&newSeparators, newFormat, index, i - index, lastQuote); @@ -1252,7 +1252,7 @@ QDateTimeParser::scanString(const QDateTime &defaultValue, return StateNode(); } - if (parserType != QVariant::Time) { + if (parserType != QMetaType::QTime) { if (year % 100 != year2digits && (isSet & YearSection2Digits)) { if (!(isSet & YearSection)) { year = (year / 100) * 100; @@ -1322,7 +1322,7 @@ QDateTimeParser::scanString(const QDateTime &defaultValue, } } - if (parserType != QVariant::Date) { + if (parserType != QMetaType::QDate) { if (isSet & Hour12Section) { const bool hasHour = isSet & Hour24Section; if (ampm == -1) { @@ -1360,7 +1360,7 @@ QDateTimeParser::scanString(const QDateTime &defaultValue, // If hour wasn't specified, check the default we're using exists on the // given date (which might be a spring-forward, skipping an hour). - if (parserType == QVariant::DateTime && !(isSet & HourSectionMask) && !when.isValid()) { + if (parserType == QMetaType::QDateTime && !(isSet & HourSectionMask) && !when.isValid()) { qint64 msecs = when.toMSecsSinceEpoch(); // Fortunately, that gets a useful answer, even though when is invalid ... const QDateTime replace = |