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

- Class List
- Class Hierarchy
- Class Members

Classes | Public Member Functions

# QDebug Class Reference

Search for all occurrences

## Detailed Description

Definition at line 62 of file qdebug.h.

`#include <qdebug.h>`

List of all members.

## Classes
struct | Stream
## Public Member Functions
| QDebug (QIODevice *device)
| QDebug (QString *string)
| QDebug (QtMsgType t)
| QDebug (const QDebug &o)
QDebug & | operator= (const QDebug &other)
| ~QDebug ()
QDebug & | space ()
QDebug & | nospace ()
QDebug & | maybeSpace ()
QDebug & | operator<< (QChar t)
QDebug & | operator<< (QBool t)
QDebug & | operator<< (bool t)
QDebug & | operator<< (char t)
QDebug & | operator<< (signed short t)
QDebug & | operator<< (unsigned short t)
QDebug & | operator<< (signed int t)
QDebug & | operator<< (unsigned int t)
QDebug & | operator<< (signed long t)
QDebug & | operator<< (unsigned long t)
QDebug & | operator<< (qint64 t)
QDebug & | operator<< (quint64 t)
QDebug & | operator<< (float t)
QDebug & | operator<< (double t)
QDebug & | operator<< (const char *t)
QDebug & | operator<< (const QString &t)
QDebug & | operator<< (const QStringRef &t)
QDebug & | operator<< (const QLatin1String &t)
QDebug & | operator<< (const QByteArray &t)
QDebug & | operator<< (const void *t)
QDebug & | operator<< (QTextStreamFunction f)
QDebug & | operator<< (QTextStreamManipulator m)

## Constructor & Destructor Documentation

QDebug | ( | QIODevice * | device | ) | `[inline]`

Definition at line 76 of file qdebug.h.

    : stream(new Stream(device)) {}

QDebug | ( | QString * | string | ) | `[inline]`

Definition at line 77 of file qdebug.h.

    : stream(new Stream(string)) {}

QDebug | ( | QtMsgType | t | ) | `[inline]`

Definition at line 78 of file qdebug.h.

    : stream(new Stream(t)) {}

QDebug | ( | const QDebug & | o | ) | `[inline]`

Definition at line 79 of file qdebug.h.

    :stream(o.stream) { ++stream->ref; }

~QDebug | ( |  | ) | `[inline]`

Definition at line 81 of file qdebug.h.

                         {
            if (!--stream->ref) {
                if(stream->message_output) {
                    QT_TRY {
                        qt_message_output(stream->type, stream->buffer.toLocal8Bit().data());
                    } QT_CATCH(std::bad_alloc&) { /* We're out of memory - give up. */ }
                }
                delete stream;
            }
        }

## Member Function Documentation

QDebug & operator= | ( | const QDebug & | other | ) | `[inline]`

Definition at line 148 of file qdebug.h.

    {
        if (this != &other) {
            QDebug copy(other);
            qSwap(stream, copy.stream);
        }
        return *this;
    }

QDebug& space | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 91 of file qdebug.h.

    { stream->space = true; stream->ts << ' '; return *this; }

QDebug& nospace | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 92 of file qdebug.h.

    { stream->space = false; return *this; }

QDebug& maybeSpace | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 93 of file qdebug.h.

    { if (stream->space) stream->ts << ' '; return *this; }

QDebug& operator<< | ( | QChar | t | ) | `[inline]`

Definition at line 95 of file qdebug.h.

    { stream->ts << '\'' << t << '\''; return maybeSpace(); }

QDebug& operator<< | ( | QBool | t | ) | `[inline]`

Definition at line 96 of file qdebug.h.

    { stream->ts << (bool(t != 0) ? "true" : "false"); return maybeSpace(); }

QDebug& operator<< | ( | bool | t | ) | `[inline]`

Definition at line 97 of file qdebug.h.

    { stream->ts << (t ? "true" : "false"); return maybeSpace(); }

QDebug& operator<< | ( | char | t | ) | `[inline]`

Definition at line 98 of file qdebug.h.

    { stream->ts << t; return maybeSpace(); }

QDebug& operator<< | ( | signed short | t | ) | `[inline]`

Definition at line 99 of file qdebug.h.

    { stream->ts << t; return maybeSpace(); }

QDebug& operator<< | ( | unsigned short | t | ) | `[inline]`

Definition at line 100 of file qdebug.h.

    { stream->ts << t; return maybeSpace(); }

QDebug& operator<< | ( | signed int | t | ) | `[inline]`

Definition at line 101 of file qdebug.h.

    { stream->ts << t; return maybeSpace(); }

QDebug& operator<< | ( | unsigned int | t | ) | `[inline]`

Definition at line 102 of file qdebug.h.

    { stream->ts << t; return maybeSpace(); }

QDebug& operator<< | ( | signed long | t | ) | `[inline]`

Definition at line 103 of file qdebug.h.

    { stream->ts << t; return maybeSpace(); }

QDebug& operator<< | ( | unsigned long | t | ) | `[inline]`

Definition at line 104 of file qdebug.h.

    { stream->ts << t; return maybeSpace(); }

QDebug& operator<< | ( | qint64 | t | ) | `[inline]`

Definition at line 105 of file qdebug.h.

            { stream->ts << QString::number(t); return maybeSpace(); }

QDebug& operator<< | ( | quint64 | t | ) | `[inline]`

Definition at line 107 of file qdebug.h.

            { stream->ts << QString::number(t); return maybeSpace(); }

QDebug& operator<< | ( | float | t | ) | `[inline]`

Definition at line 109 of file qdebug.h.

    { stream->ts << t; return maybeSpace(); }

QDebug& operator<< | ( | double | t | ) | `[inline]`

Definition at line 110 of file qdebug.h.

    { stream->ts << t; return maybeSpace(); }

QDebug& operator<< | ( | const char * | t | ) | `[inline]`

Definition at line 111 of file qdebug.h.

    { stream->ts << QString::fromAscii(t); return maybeSpace(); }

QDebug& operator<< | ( | const QString & | t | ) | `[inline]`

Definition at line 112 of file qdebug.h.

    { stream->ts << '\"' << t  << '\"'; return maybeSpace(); }

QDebug& operator<< | ( | const QStringRef & | t | ) | `[inline]`

Definition at line 113 of file qdebug.h.

    { return operator<<(t.toString()); }

QDebug& operator<< | ( | const QLatin1String & | t | ) | `[inline]`

Definition at line 114 of file qdebug.h.

    { stream->ts << '\"'  << t.latin1() << '\"'; return maybeSpace(); }

QDebug& operator<< | ( | const QByteArray & | t | ) | `[inline]`

Definition at line 115 of file qdebug.h.

    { stream->ts  << '\"' << t << '\"'; return maybeSpace(); }

QDebug& operator<< | ( | const void * | t | ) | `[inline]`

Definition at line 116 of file qdebug.h.

    { stream->ts << t; return maybeSpace(); }

QDebug& operator<< | ( | QTextStreamFunction | f | ) | `[inline]`

Definition at line 117 of file qdebug.h.

                                                         {
            stream->ts << f;
            return *this;
        }

QDebug& operator<< | ( | QTextStreamManipulator | m | ) | `[inline]`

Definition at line 122 of file qdebug.h.

        { stream->ts << m; return *this; }

The documentation for this class was generated from the following file:

- QtCore/qdebug.h

QDebug QDebug QDebug QDebug QDebug QDebug QDebug QDebug QDebug QDebug
QDebug QDebug QDebug QDebug QDebug QDebug QDebug QDebug QDebug QDebug