From 915e756a426ccb0ad4d4322182d1468a995b4c18 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 27 Apr 2020 11:16:52 +0200 Subject: QtCore: fix a few more char/int/uint -> QChar conversions They were masked by all QChar ctors being made explicit, except the char16_t one, which was left as the only viable choice. Change-Id: I5632795f3c7dd1de3830285d5446d9b994613466 Reviewed-by: Thiago Macieira --- src/corelib/time/qdatetimeparser.cpp | 4 ++-- src/corelib/time/qtimezoneprivate_tz.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/time') diff --git a/src/corelib/time/qdatetimeparser.cpp b/src/corelib/time/qdatetimeparser.cpp index bc3d9b992e..860f975b4f 100644 --- a/src/corelib/time/qdatetimeparser.cpp +++ b/src/corelib/time/qdatetimeparser.cpp @@ -1663,9 +1663,9 @@ QDateTimeParser::findTimeZone(QStringRef str, const QDateTime &when, // Collect up plausibly-valid characters; let QTimeZone work out what's truly valid. while (index < size) { - QChar here = str[index]; + const auto here = str[index].unicode(); if (here < 127 - && (here.isLetterOrNumber() + && (QChar::isLetterOrNumber(here) || here == '/' || here == '-' || here == '_' || here == '.' || here == '+' || here == ':')) diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp index 01f9a6cce0..d40f4612d5 100644 --- a/src/corelib/time/qtimezoneprivate_tz.cpp +++ b/src/corelib/time/qtimezoneprivate_tz.cpp @@ -91,7 +91,7 @@ static QTzTimeZoneHash loadTzTimeZones() while (!ts.atEnd()) { const QString line = ts.readLine(); // Comment lines are prefixed with a # - if (!line.isEmpty() && line.at(0) != '#') { + if (!line.isEmpty() && line.at(0) != u'#') { // Data rows are tab-separated columns Region, Coordinates, ID, Optional Comments const auto parts = line.splitRef(QLatin1Char('\t')); QTzTimeZone zone; -- cgit v1.2.3