summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.h
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-05-20 16:43:10 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-05-20 16:43:10 (GMT)
commitbfde87dcc8d0f363ecf1da59482c15445b00484c (patch)
tree0d0c01b1611caf91ba900bd2b67a8806590254cc /src/corelib/io/qdebug.h
parent27fadaa7eb2d58b47e7f0f508e3402e7a8de3894 (diff)
parentf9d26f0bebd5bcc32d15c4a627251c44cf78389e (diff)
downloadQt-bfde87dcc8d0f363ecf1da59482c15445b00484c.zip
Qt-bfde87dcc8d0f363ecf1da59482c15445b00484c.tar.gz
Qt-bfde87dcc8d0f363ecf1da59482c15445b00484c.tar.bz2
Merge commit 'qt/master'
Diffstat (limited to 'src/corelib/io/qdebug.h')
-rw-r--r--src/corelib/io/qdebug.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h
index 8334146..9b0fbe5 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -51,6 +51,7 @@
#include <QtCore/qstring.h>
#include <QtCore/qvector.h>
#include <QtCore/qset.h>
+#include <QtCore/qcontiguouscache.h>
QT_BEGIN_HEADER
@@ -232,6 +233,24 @@ inline QDebug operator<<(QDebug debug, const QSet<T> &set)
return operator<<(debug, set.toList());
}
+#if defined(FORCE_UREF)
+template <class T>
+inline QDebug &operator<<(QDebug debug, const QContiguousCache<T> &cache)
+#else
+template <class T>
+inline QDebug operator<<(QDebug debug, const QContiguousCache<T> &cache)
+#endif
+{
+ debug.nospace() << "QContiguousCache(";
+ for (int i = cache.firstIndex(); i <= cache.lastIndex(); ++i) {
+ debug << cache[i];
+ if (i != cache.lastIndex())
+ debug << ", ";
+ }
+ debug << ")";
+ return debug.space();
+}
+
#if !defined(QT_NO_DEBUG_STREAM)
Q_CORE_EXPORT_INLINE QDebug qDebug() { return QDebug(QtDebugMsg); }