summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qdebug.cpp')
-rw-r--r--src/corelib/io/qdebug.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp
index 600b8b13b80..1c6aecaaabb 100644
--- a/src/corelib/io/qdebug.cpp
+++ b/src/corelib/io/qdebug.cpp
@@ -1000,6 +1000,8 @@ QDebug &QDebug::resetFormat()
\since 6.0
\include qdebug-toString.qdocinc
+
+ \sa toBytes()
*/
/*! \internal */
@@ -1014,6 +1016,26 @@ QString QDebug::toStringImpl(StreamTypeErased s, const void *obj)
}
/*!
+ \fn template <class T> QByteArray QDebug::toBytes(const T &object)
+ \since 6.9
+
+ This is equivalent to \c{QDebug::toString(object).toUtf8()}, but more efficient.
+
+ \sa toString()
+*/
+
+/*! \internal */
+QByteArray QDebug::toBytesImpl(StreamTypeErased s, const void *obj)
+{
+ QByteArray result;
+ {
+ QDebug d(&result);
+ s(d.nospace(), obj);
+ }
+ return result;
+}
+
+/*!
\fn template <class T> QDebug operator<<(QDebug debug, const QList<T> &list)
\relates QDebug