summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.cpp
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-11-02 23:29:08 +0100
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-11-07 09:35:11 +0100
commit7cad91a7df03d0683c81519ae6839c5f546cfceb (patch)
tree4a3e855fe8b3ee7407e7138b10305165254a1e67 /src/corelib/io/qdebug.cpp
parentb8069f0a4783cd80c1b2c44053e054607b066d79 (diff)
QDebug: add op<<(QByteArrayView)
[ChangeLog][QtCore][QDebug] Added streaming of QByteArrayViews. Task-number: QTBUG-88029 Change-Id: I66f5cc45a0438dbaacb1754cb3c669b3717f528b Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qdebug.cpp')
-rw-r--r--src/corelib/io/qdebug.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp
index 1a0ec17397..28d8548300 100644
--- a/src/corelib/io/qdebug.cpp
+++ b/src/corelib/io/qdebug.cpp
@@ -698,6 +698,25 @@ QDebug &QDebug::resetFormat()
*/
/*!
+ \since 6.0
+ \fn QDebug &QDebug::operator<<(QByteArrayView t)
+
+ Writes the data of the observed byte array, \a t, to the stream and returns
+ a reference to the stream.
+
+ Normally, QDebug prints the data inside quotes and transforms control or
+ non-US-ASCII characters to their C escape sequences (\\xAB). This way, the
+ output is always 7-bit clean and the string can be copied from the output
+ and pasted back into C++ sources, if necessary.
+
+ To print non-printable characters without transformation, enable the
+ noquote() functionality. Note that some QDebug backends might not be 8-bit
+ clean.
+
+ See the QByteArray overload for examples.
+*/
+
+/*!
\fn QDebug &QDebug::operator<<(const void *t)
Writes a pointer, \a t, to the stream and returns a reference to the stream.