QDebug Class Reference

#include <qdebug.h>

Collaboration diagram for QDebug:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 42 of file qdebug.h.

Public Member Functions

 QDebug (QIODevice *device)
 QDebug (QString *string)
 QDebug (QtMsgType t)
 QDebug (const QDebug &o)
QDebugoperator= (const QDebug &other)
 ~QDebug ()
QDebugspace ()
QDebugnospace ()
QDebugmaybeSpace ()
QDebugoperator<< (QChar t)
QDebugoperator<< (bool t)
QDebugoperator<< (char t)
QDebugoperator<< (signed short t)
QDebugoperator<< (unsigned short t)
QDebugoperator<< (signed int t)
QDebugoperator<< (unsigned int t)
QDebugoperator<< (signed long t)
QDebugoperator<< (unsigned long t)
QDebugoperator<< (qint64 t)
QDebugoperator<< (quint64 t)
QDebugoperator<< (float t)
QDebugoperator<< (double t)
QDebugoperator<< (const char *t)
QDebugoperator<< (const QString &t)
QDebugoperator<< (const QLatin1String &t)
QDebugoperator<< (const QByteArray &t)
QDebugoperator<< (const void *t)
QDebugoperator<< (QTextStreamFunction f)
QDebugoperator<< (QTextStreamManipulator m)

Private Attributes

QDebug::Streamstream

Classes

struct  Stream


Constructor & Destructor Documentation

QDebug::QDebug ( QIODevice device  )  [inline]

Definition at line 56 of file qdebug.h.

00056 : stream(new Stream(device)) {}

QDebug::QDebug ( QString string  )  [inline]

Definition at line 57 of file qdebug.h.

00057 : stream(new Stream(string)) {}

QDebug::QDebug ( QtMsgType  t  )  [inline]

Definition at line 58 of file qdebug.h.

00058 : stream(new Stream(t)) {}

QDebug::QDebug ( const QDebug o  )  [inline]

Definition at line 59 of file qdebug.h.

References QTest::stream.

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

QDebug::~QDebug (  )  [inline]

Definition at line 61 of file qdebug.h.

References qt_message_output(), and QTest::stream.

00061                      {
00062         if (!--stream->ref) {
00063             if(stream->message_output)
00064                 qt_message_output(stream->type, stream->buffer.toLocal8Bit().data());
00065             delete stream;
00066         }
00067     }

Here is the call graph for this function:


Member Function Documentation

QDebug & QDebug::operator= ( const QDebug other  )  [inline]

Definition at line 101 of file qdebug.h.

References TokenEngine::copy(), qSwap(), and stream.

00102 {
00103     if (this != &other) {
00104         QDebug copy(other);
00105         qSwap(stream, copy.stream);
00106     }
00107     return *this;
00108 }

Here is the call graph for this function:

QDebug& QDebug::space (  )  [inline]

Definition at line 68 of file qdebug.h.

References QTest::stream.

Referenced by operator<<().

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

QDebug& QDebug::nospace (  )  [inline]

Definition at line 69 of file qdebug.h.

References QTest::stream.

Referenced by QShortcutMap::addShortcut(), QShortcutMap::correctContext(), debugVariant(), debugVariantList(), debugVariantMap(), QShortcutMap::dispatchEvent(), QTextHtmlParser::dumpHtml(), flagsDebug(), QShortcutMap::nextState(), operator<<(), QShortcutMap::removeShortcut(), QShortcutMap::setShortcutAutoRepeat(), QShortcutMap::setShortcutEnabled(), and streamDebug().

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

QDebug& QDebug::maybeSpace (  )  [inline]

Definition at line 70 of file qdebug.h.

References QTest::stream.

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

QDebug& QDebug::operator<< ( QChar  t  )  [inline]

Definition at line 72 of file qdebug.h.

References QTest::stream, and t.

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

QDebug& QDebug::operator<< ( bool  t  )  [inline]

Definition at line 73 of file qdebug.h.

References QTest::stream.

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

QDebug& QDebug::operator<< ( char  t  )  [inline]

Definition at line 74 of file qdebug.h.

References QTest::stream.

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

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

Definition at line 75 of file qdebug.h.

References QTest::stream.

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

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

Definition at line 76 of file qdebug.h.

References QTest::stream.

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

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

Definition at line 77 of file qdebug.h.

References QTest::stream.

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

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

Definition at line 78 of file qdebug.h.

References QTest::stream.

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

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

Definition at line 79 of file qdebug.h.

References QTest::stream.

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

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

Definition at line 80 of file qdebug.h.

References QTest::stream.

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

QDebug& QDebug::operator<< ( qint64  t  )  [inline]

Definition at line 81 of file qdebug.h.

References QString::number(), and QTest::stream.

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

Here is the call graph for this function:

QDebug& QDebug::operator<< ( quint64  t  )  [inline]

Definition at line 83 of file qdebug.h.

References QString::number(), and QTest::stream.

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

Here is the call graph for this function:

QDebug& QDebug::operator<< ( float  t  )  [inline]

Definition at line 85 of file qdebug.h.

References QTest::stream.

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

QDebug& QDebug::operator<< ( double  t  )  [inline]

Definition at line 86 of file qdebug.h.

References QTest::stream.

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

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

Definition at line 87 of file qdebug.h.

References QString::fromAscii(), and QTest::stream.

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

Here is the call graph for this function:

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

Definition at line 88 of file qdebug.h.

References QTest::stream, and t.

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

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

Definition at line 89 of file qdebug.h.

References QTest::stream, and t.

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

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

Definition at line 90 of file qdebug.h.

References QTest::stream, and t.

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

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

Definition at line 91 of file qdebug.h.

References QTest::stream.

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

QDebug& QDebug::operator<< ( QTextStreamFunction  f  )  [inline]

Definition at line 92 of file qdebug.h.

References QTest::stream.

00092                                                      {
00093         stream->ts << f;
00094         return *this;
00095     }

QDebug& QDebug::operator<< ( QTextStreamManipulator  m  )  [inline]

Definition at line 97 of file qdebug.h.

References m, and QTest::stream.

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


Member Data Documentation

struct QDebug::Stream * QDebug::stream [private]

Referenced by operator=().


The documentation for this class was generated from the following file:
Generated on Thu Mar 15 17:14:32 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1