summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-06-24 14:54:54 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-11-28 16:25:52 +0000
commit88d7c8f963414f4d3ac7a406faddcc074ca6462d (patch)
tree4eec72e18336e835b2f9b46bb2654a0753e1cf84 /src/corelib/io/qdebug.cpp
parentbfdcbe8bfb526688b0f40b5d8a51f2fd145b2ade (diff)
QDebug: refactor streaming of sequential containers and add suppoprt for STL types
What triggered this change was the use of QVector::toList() in op<<(QDebug, QVector). Only added support for STL types of which we already include the headers. [ChangeLog][QtCore][QDebug] Can now output std::vector, std::list, std::map, and std::multimap. Change-Id: I49581e3038daa7626b00169430b72d3d5175eae7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/io/qdebug.cpp')
-rw-r--r--src/corelib/io/qdebug.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp
index 81af96b96b..002c9bcda2 100644
--- a/src/corelib/io/qdebug.cpp
+++ b/src/corelib/io/qdebug.cpp
@@ -704,6 +704,15 @@ QDebug &QDebug::resetFormat()
*/
/*!
+ \fn QDebug operator<<(QDebug stream, const std::list<T, Alloc> &list)
+ \relates QDebug
+ \since 5.7
+
+ Writes the contents of \a list to \a stream. \c T needs to
+ support streaming into QDebug.
+*/
+
+/*!
\fn QDebug operator<<(QDebug stream, const QVector<T> &vector)
\relates QDebug
@@ -712,6 +721,15 @@ QDebug &QDebug::resetFormat()
*/
/*!
+ \fn QDebug operator<<(QDebug stream, const std::vector<T, Alloc> &vector)
+ \relates QDebug
+ \since 5.7
+
+ Writes the contents of \a vector to \a stream. \c T needs to
+ support streaming into QDebug.
+*/
+
+/*!
\fn QDebug operator<<(QDebug stream, const QSet<T> &set)
\relates QDebug
@@ -728,6 +746,24 @@ QDebug &QDebug::resetFormat()
*/
/*!
+ \fn QDebug operator<<(QDebug stream, const std::map<Key, T, Compare, Alloc> &map)
+ \relates QDebug
+ \since 5.7
+
+ Writes the contents of \a map to \a stream. Both \c Key and
+ \c T need to support streaming into QDebug.
+*/
+
+/*!
+ \fn QDebug operator<<(QDebug stream, const std::multimap<Key, T, Compare, Alloc> &map)
+ \relates QDebug
+ \since 5.7
+
+ Writes the contents of \a map to \a stream. Both \c Key and
+ \c T need to support streaming into QDebug.
+*/
+
+/*!
\fn QDebug operator<<(QDebug stream, const QHash<Key, T> &hash)
\relates QDebug