- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

Classes | Functions

# qdebug.h File Reference

`#include <QtCore/qalgorithms.h>`
`#include <QtCore/qhash.h>`
`#include <QtCore/qlist.h>`
`#include <QtCore/qmap.h>`
`#include <QtCore/qpair.h>`
`#include <QtCore/qtextstream.h>`
`#include <QtCore/qstring.h>`
`#include <QtCore/qvector.h>`
`#include <QtCore/qset.h>`
`#include <QtCore/qcontiguouscache.h>`

Go to the source code of this file.

## Classes
class | QDebug
struct | QDebug::Stream
class | QNoDebug
## Functions
Q_CORE_EXPORT_INLINE QDebug | qCritical ()
template<class T >
QDebug | operator<< (QDebug debug, const QList< T > &list)
template<typename T >
QDebug | operator<< (QDebug debug, const QVector< T > &vec)
template<class aKey , class aT >
QDebug | operator<< (QDebug debug, const QMap< aKey, aT > &map)
template<class aKey , class aT >
QDebug | operator<< (QDebug debug, const QHash< aKey, aT > &hash)
template<class T1 , class T2 >
QDebug | operator<< (QDebug debug, const QPair< T1, T2 > &pair)
template<typename T >
QDebug | operator<< (QDebug debug, const QSet< T > &set)
template<class T >
QDebug | operator<< (QDebug debug, const QContiguousCache< T > &cache)
template<class T >
QDebug | operator<< (QDebug debug, const QFlags< T > &flags)
Q_CORE_EXPORT_INLINE QDebug | qDebug ()
Q_CORE_EXPORT_INLINE QDebug | qWarning ()

## Function Documentation

Q_CORE_EXPORT_INLINE QDebug qCritical | ( |  | ) |

Search for all occurrences

Definition at line 146 of file qdebug.h.

    { return QDebug(QtCriticalMsg); }

QDebug operator<< | ( | QDebug | debug,
|  | const QList< T > & | list
| ) |  | `[inline]`

Definition at line 162 of file qdebug.h.

    {
        debug.nospace() << '(';
        for (Q_TYPENAME QList<T>::size_type i = 0; i < list.count(); ++i) {
            if (i)
                debug << ", ";
            debug << list.at(i);
        }
        debug << ')';
        return debug.space();
    }

QDebug operator<< | ( | QDebug | debug,
|  | const QVector< T > & | vec
| ) |  | `[inline]`

Definition at line 180 of file qdebug.h.

    {
        debug.nospace() << "QVector";
        return operator<<(debug, vec.toList());
    }

QDebug operator<< | ( | QDebug | debug,
|  | const QMap< aKey, aT > & | map
| ) |  | `[inline]`

Definition at line 192 of file qdebug.h.

    {
        debug.nospace() << "QMap(";
        for (typename QMap<aKey, aT>::const_iterator it = map.constBegin();
             it != map.constEnd(); ++it) {
            debug << '(' << it.key() << ", " << it.value() << ')';
        }
        debug << ')';
        return debug.space();
    }

QDebug operator<< | ( | QDebug | debug,
|  | const QHash< aKey, aT > & | hash
| ) |  | `[inline]`

Definition at line 209 of file qdebug.h.

    {
        debug.nospace() << "QHash(";
        for (typename QHash<aKey, aT>::const_iterator it = hash.constBegin();
                it != hash.constEnd(); ++it)
            debug << '(' << it.key() << ", " << it.value() << ')';
        debug << ')';
        return debug.space();
    }

QDebug operator<< | ( | QDebug | debug,
|  | const QPair< T1, T2 > & | pair
| ) |  | `[inline]`

Definition at line 225 of file qdebug.h.

    {
        debug.nospace() << "QPair(" << pair.first << ',' << pair.second << ')';
        return debug.space();
    }

QDebug operator<< | ( | QDebug | debug,
|  | const QSet< T > & | set
| ) |  | `[inline]`

Definition at line 233 of file qdebug.h.

    {
        debug.nospace() << "QSet";
        return operator<<(debug, set.toList());
    }

QDebug operator<< | ( | QDebug | debug,
|  | const QContiguousCache< T > & | cache
| ) |  | `[inline]`

Definition at line 244 of file qdebug.h.

    {
        debug.nospace() << "QContiguousCache(";
        for (int i = cache.firstIndex(); i <= cache.lastIndex(); ++i) {
            debug << cache[i];
            if (i != cache.lastIndex())
                debug << ", ";
        }
        debug << ')';
        return debug.space();
    }

QDebug operator<< | ( | QDebug | debug,
|  | const QFlags< T > & | flags
| ) |  | `[inline]`

Definition at line 262 of file qdebug.h.

    {
        debug.nospace() << "QFlags(";
        bool needSeparator = false;
        for (uint i = 0; i < sizeof(T) * 8; ++i) {
            if (flags.testFlag(T(1 << i))) {
                if (needSeparator)
                    debug.nospace() << '|';
                else
                    needSeparator = true;
                debug.nospace() << "0x" << QByteArray::number(T(1 << i), 16).constData();
            }
        }
        debug << ')';
        return debug.space();
    }

Q_CORE_EXPORT_INLINE QDebug qDebug | ( |  | ) |

Search for all occurrences

Definition at line 281 of file qdebug.h.

    { return QDebug(QtDebugMsg); }

Q_CORE_EXPORT_INLINE QDebug qWarning | ( |  | ) |

Search for all occurrences

Definition at line 296 of file qdebug.h.

    { return QDebug(QtWarningMsg); }