aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4dateobject.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-06-02 16:08:59 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-06-03 15:47:06 +0200
commit33a7f5ee4d8d4dc197100e3cda141063b89f74e6 (patch)
tree58a48bb5ab2a45d35c11187c6aeb4c94f974724c /src/qml/jsruntime/qv4dateobject.cpp
parent5e0bf417fb38c53d4ae43f9f84fe42461cd2e00c (diff)
QtQml: Use unicode character literals
This avoids the warnings on conversion to QChar. Change-Id: Ib774f24592d6f09a531c60bb6fa6e5bdbec88120 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4dateobject.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp
index bebcbd7e44..310d393c12 100644
--- a/src/qml/jsruntime/qv4dateobject.cpp
+++ b/src/qml/jsruntime/qv4dateobject.cpp
@@ -452,16 +452,16 @@ static inline double ParseString(const QString &s, double localTZA)
bool seenZ = false; // Have seen zone, i.e. +HH:mm or literal Z.
bool error = false;
- if (*ch == '+' || *ch == '-') {
+ if (*ch == u'+' || *ch == u'-') {
extendedYear = true;
- if (*ch == '-')
+ if (*ch == u'-')
yearSign = -1;
++ch;
}
for (; ch <= end && !error && format != Done; ++ch) {
- if (*ch >= '0' && *ch <= '9') {
+ if (*ch >= u'0' && *ch <= u'9') {
current *= 10;
- current += ch->unicode() - '0';
+ current += ch->unicode() - u'0';
++currentSize;
} else { // other char, delimits field
switch (format) {
@@ -507,12 +507,12 @@ static inline double ParseString(const QString &s, double localTZA)
error = (currentSize != 2) || current >= 60;
break;
}
- if (*ch == 'T') {
+ if (*ch == u'T') {
if (format >= Hour)
error = true;
format = Hour;
seenT = true;
- } else if (*ch == '-') {
+ } else if (*ch == u'-') {
if (format < Day)
++format;
else if (format < Minute)
@@ -524,19 +524,19 @@ static inline double ParseString(const QString &s, double localTZA)
offsetSign = -1;
format = TimezoneHour;
}
- } else if (*ch == ':') {
+ } else if (*ch == u':') {
if (format != Hour && format != Minute && format != TimezoneHour)
error = true;
++format;
- } else if (*ch == '.') {
+ } else if (*ch == u'.') {
if (format != Second)
error = true;
++format;
- } else if (*ch == '+') {
+ } else if (*ch == u'+') {
if (seenZ || format < Minute || format >= TimezoneHour)
error = true;
format = TimezoneHour;
- } else if (*ch == 'Z') {
+ } else if (*ch == u'Z') {
if (seenZ || format < Minute || format >= TimezoneHour)
error = true;
else