diff options
author | Ulf Hermann <[email protected]> | 2020-06-02 16:08:59 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2020-06-03 15:47:06 +0200 |
commit | 33a7f5ee4d8d4dc197100e3cda141063b89f74e6 (patch) | |
tree | 58a48bb5ab2a45d35c11187c6aeb4c94f974724c /src/qml/jsruntime/qv4globalobject.cpp | |
parent | 5e0bf417fb38c53d4ae43f9f84fe42461cd2e00c (diff) |
QtQml: Use unicode character literals
This avoids the warnings on conversion to QChar.
Change-Id: Ib774f24592d6f09a531c60bb6fa6e5bdbec88120
Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4globalobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4globalobject.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp index 1b47620572..7fa32da8aa 100644 --- a/src/qml/jsruntime/qv4globalobject.cpp +++ b/src/qml/jsruntime/qv4globalobject.cpp @@ -80,13 +80,13 @@ static QString escape(const QString &input) || (uc == 0x5F)) { output.append(QChar(uc)); } else { - output.append('%'); + output.append(u'%'); output.append(QLatin1Char(toHexUpper(uc >> 4))); output.append(QLatin1Char(toHexUpper(uc))); } } else { - output.append('%'); - output.append('u'); + output.append(u'%'); + output.append(u'u'); output.append(QLatin1Char(toHexUpper(uc >> 12))); output.append(QLatin1Char(toHexUpper(uc >> 8))); output.append(QLatin1Char(toHexUpper(uc >> 4))); @@ -104,9 +104,9 @@ static QString unescape(const QString &input) const int length = input.length(); while (i < length) { QChar c = input.at(i++); - if ((c == '%') && (i + 1 < length)) { + if ((c == u'%') && (i + 1 < length)) { QChar a = input.at(i); - if ((a == 'u') && (i + 4 < length)) { + if ((a == u'u') && (i + 4 < length)) { int d3 = fromHex(input.at(i+1).unicode()); int d2 = fromHex(input.at(i+2).unicode()); int d1 = fromHex(input.at(i+3).unicode()); |