diff options
Diffstat (limited to 'src/corelib/io/qdebug.cpp')
| -rw-r--r-- | src/corelib/io/qdebug.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index 70a688e40ff..5d6b5e06be6 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -200,7 +200,7 @@ template <typename Char> static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, size_t length, bool isUnicode = true) { QChar quote(u'"'); - d->write("e, 1); + d->write(quote); bool lastWasHexEscape = false; const Char *end = begin + length; @@ -227,8 +227,7 @@ static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, si continue; } } else if (isPrintable(*p) && *p != '\\' && *p != '"') { - QChar c = QLatin1Char(*p); - d->write(&c, 1); + d->write(char16_t{uchar(*p)}); continue; } @@ -302,7 +301,7 @@ static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, si d->write(reinterpret_cast<QChar *>(buf), buflen); } - d->write("e, 1); + d->write(quote); } /*! |
