summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-03-09 16:34:49 +0100
committerSona Kurazyan <sona.kurazyan@qt.io>2022-03-25 19:16:29 +0100
commit753a08ae0e1204b148cf3935f87349eefe75d338 (patch)
tree193ff5b6a131bba519336c31727d708ddab43032 /src/corelib/io/qdebug.cpp
parent1fefff6d1f99dbcf1a453424753ad5562fb675ef (diff)
QtCore: replace QLatin1String/QLatin1Char with _L1/u'' where applicable
As a drive-by, did also minor refactorings/improvements. Task-number: QTBUG-98434 Change-Id: I81964176ae2f07ea63674c96f47f9c6aa046854f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Diffstat (limited to 'src/corelib/io/qdebug.cpp')
-rw-r--r--src/corelib/io/qdebug.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp
index 4956b2a59c..525f032368 100644
--- a/src/corelib/io/qdebug.cpp
+++ b/src/corelib/io/qdebug.cpp
@@ -196,7 +196,7 @@ QByteArray QtDebugUtils::toPrintable(const char *data, int len, int maxSize)
QDebug::~QDebug()
{
if (stream && !--stream->ref) {
- if (stream->space && stream->buffer.endsWith(QLatin1Char(' ')))
+ if (stream->space && stream->buffer.endsWith(u' '))
stream->buffer.chop(1);
if (stream->message_output) {
qt_message_output(stream->type,
@@ -222,7 +222,7 @@ void QDebug::putUcs4(uint ucs4)
stream->ts << "\\u" << qSetFieldWidth(4);
else
stream->ts << "\\U" << qSetFieldWidth(8);
- stream->ts << Qt::hex << qSetPadChar(QLatin1Char('0')) << ucs4 << Qt::reset;
+ stream->ts << Qt::hex << qSetPadChar(u'0') << ucs4 << Qt::reset;
}
maybeQuote('\'');
}
@@ -240,7 +240,7 @@ static inline bool isPrintable(uchar c)
template <typename Char>
static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, int length, bool isUnicode = true)
{
- QChar quote(QLatin1Char('"'));
+ QChar quote(u'"');
d->write(&quote, 1);
bool lastWasHexEscape = false;
@@ -250,7 +250,7 @@ static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, in
if (Q_UNLIKELY(lastWasHexEscape)) {
if (fromHex(*p) != -1) {
// yes, insert it
- QChar quotes[] = { QLatin1Char('"'), QLatin1Char('"') };
+ QChar quotes[] = { quote, quote };
d->write(quotes, 2);
}
lastWasHexEscape = false;
@@ -983,7 +983,7 @@ public:
{
const bool currentSpaces = m_stream->space;
if (currentSpaces && !m_spaces)
- if (m_stream->buffer.endsWith(QLatin1Char(' ')))
+ if (m_stream->buffer.endsWith(u' '))
m_stream->buffer.chop(1);
m_stream->space = m_spaces;