diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-15 04:15:40 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-15 04:15:40 (GMT) |
commit | 3e056e3c1da450d3b879b68cdfa15bc5959ffbc8 (patch) | |
tree | 53a77ae62bb9ccc8eca9e72c5419c1bd0d61c869 /src/corelib/io/qdebug.h | |
parent | 9861d14de8f77d90a40163298699c86a986b3f6a (diff) | |
parent | 272c26b6daf3e48c3f338f4c78cc9e694ac7993f (diff) | |
download | Qt-3e056e3c1da450d3b879b68cdfa15bc5959ffbc8.zip Qt-3e056e3c1da450d3b879b68cdfa15bc5959ffbc8.tar.gz Qt-3e056e3c1da450d3b879b68cdfa15bc5959ffbc8.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/corelib/io/qdebug.h')
-rw-r--r-- | src/corelib/io/qdebug.h | 19 |
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); } |