diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-03 12:21:46 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-09-11 19:32:36 +0200 |
commit | 1316a0aef287e47d63aab247751842a901d8f786 (patch) | |
tree | accd64be2c7bc3b8bcf946a364821d833b24aec4 /src/corelib/io/qdebug.cpp | |
parent | defc8414fde0ea9f52fe554e00fe2f04947b7578 (diff) |
Fix Qt6 related comments in qdebug
Change-Id: I9861d29a6615863094cd007178f214a816865eb7
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/corelib/io/qdebug.cpp')
-rw-r--r-- | src/corelib/io/qdebug.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index d34c2e5a36..c711c28f62 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -304,7 +304,7 @@ static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, in */ void QDebug::putString(const QChar *begin, size_t length) { - if (stream->testFlag(Stream::NoQuotes)) { + if (stream->noQuotes) { // no quotes, write the string directly too (no pretty-printing) // this respects the QTextStream state, though stream->ts.d_ptr->putString(begin, int(length)); @@ -322,7 +322,7 @@ void QDebug::putString(const QChar *begin, size_t length) */ void QDebug::putByteArray(const char *begin, size_t length, Latin1Content content) { - if (stream->testFlag(Stream::NoQuotes)) { + if (stream->noQuotes) { // no quotes, write the string directly too (no pretty-printing) // this respects the QTextStream state, though QString string = content == ContainsLatin1 ? QString::fromLatin1(begin, int(length)) : QString::fromUtf8(begin, int(length)); @@ -354,9 +354,8 @@ QDebug &QDebug::resetFormat() { stream->ts.reset(); stream->space = true; - if (stream->context.version > 1) - stream->flags = 0; - stream->setVerbosity(DefaultVerbosity); + stream->noQuotes = false; + stream->verbosity = DefaultVerbosity; return *this; } @@ -853,7 +852,8 @@ public: QDebugStateSaverPrivate(QDebug::Stream *stream) : m_stream(stream), m_spaces(stream->space), - m_flags(stream->context.version > 1 ? stream->flags : 0), + m_noQuotes(stream->noQuotes), + m_verbosity(stream->verbosity), m_streamParams(stream->ts.d_ptr->params) { } @@ -865,9 +865,9 @@ public: m_stream->buffer.chop(1); m_stream->space = m_spaces; + m_stream->noQuotes = m_noQuotes; m_stream->ts.d_ptr->params = m_streamParams; - if (m_stream->context.version > 1) - m_stream->flags = m_flags; + m_stream->verbosity = m_verbosity; if (!currentSpaces && m_spaces) m_stream->ts << ' '; @@ -877,7 +877,8 @@ public: // QDebug state const bool m_spaces; - const int m_flags; + const bool m_noQuotes; + const int m_verbosity; // QTextStream state const QTextStreamPrivate::Params m_streamParams; |