diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2020-05-07 15:22:52 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2020-05-11 09:02:44 +0000 |
commit | 219e7bafa278792f7bde110d24333fb60b555c12 (patch) | |
tree | 46b9f9f69552cc7ee2f39e01f846d285c526474a /src/gui/text/qcssparser.cpp | |
parent | 9e56d28663b7df82882d2d0dcc72f3a48bcc6cf9 (diff) |
QtGui: fix deprecated QChar conversions
Conversions from non-char-types to QChar are going to be deprecated.
Use QChar::fromUcs2(), fromUcs4(), QLatin1Char(), or convert the
constructor argument to char16_t.
Change-Id: Ib45ebd5560aa3a2bc460037ab09773607485c6e2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/text/qcssparser.cpp')
-rw-r--r-- | src/gui/text/qcssparser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp index 50c13d41f6..0896453ca8 100644 --- a/src/gui/text/qcssparser.cpp +++ b/src/gui/text/qcssparser.cpp @@ -2189,9 +2189,9 @@ QString Scanner::preprocess(const QString &input, bool *hasEscapeSequences) hexCount = qMin(hexCount, 6); bool ok = false; - ushort code = output.midRef(hexStart, hexCount).toUShort(&ok, 16); + const char16_t code = output.midRef(hexStart, hexCount).toUShort(&ok, 16); if (ok) { - output.replace(hexStart - 1, hexCount + 1, QChar(code)); + output.replace(hexStart - 1, hexCount + 1, code); i = hexStart; } else { i = hexStart; |