summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2021-06-07 09:49:23 +0200
committerMarc Mutz <marc.mutz@kdab.com>2021-06-13 21:01:24 +0200
commit734429f4a3b20f85f231bd9c8920bf3aa7f14e74 (patch)
tree23f86a93d09709f0b1fa3b1e5d7ceaa1a4aacb4a /src/corelib
parentcffc667ad9dae10adf415357a606e7253a0c3206 (diff)
QDebug: add support for QVarLengthArray
Remove a conflicting definition of the same operator from qrhi.cpp. Who knows how many ODR violations this hidden gem may have caused... [ChangeLog][QtCore][QDebug] Can now stream QVarLengthArray objects. [ChangeLog][QtCore][QVarLengthArray] Can now be output via QDebug streaming. Change-Id: I12f7670e32029fa8c96b446e9a98ebf3b9732d0d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qdebug.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 29da386c1b..71ad610e19 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -48,6 +48,7 @@
#include <QtCore/qtextstream.h>
#include <QtCore/qstring.h>
#include <QtCore/qset.h>
+#include <QtCore/qvarlengtharray.h>
#include <QtCore/qcontiguouscache.h>
#include <QtCore/qsharedpointer.h>
@@ -249,6 +250,12 @@ inline QDebugIfHasDebugStream<T> operator<<(QDebug debug, const QList<T> &vec)
return QtPrivate::printSequentialContainer(debug, "QList", vec);
}
+template<typename T, qsizetype P>
+inline QDebugIfHasDebugStream<T> operator<<(QDebug debug, const QVarLengthArray<T, P> &vec)
+{
+ return QtPrivate::printSequentialContainer(debug, "QVarLengthArray", vec);
+}
+
template <typename T, typename Alloc>
inline QDebugIfHasDebugStream<T> operator<<(QDebug debug, const std::vector<T, Alloc> &vec)
{