QDebug Class Reference

QDebug Class Reference

#include <qdebug.h>

Class Description

Definition at line 62 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<< (QBool 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 QStringRef &t)
 
QDebugoperator<< (const QLatin1String &t)
 
QDebugoperator<< (const QByteArray &t)
 
QDebugoperator<< (const void *t)
 
QDebugoperator<< (QTextStreamFunction f)
 
QDebugoperator<< (QTextStreamManipulator m)
 

Constructor & Destructor Documentation

QDebug ( QIODevice device)
inline

Definition at line 76 of file qdebug.h.

76 : stream(new Stream(device)) {}
QDebug ( QString string)
inline

Definition at line 77 of file qdebug.h.

77 : stream(new Stream(string)) {}
QDebug ( QtMsgType  t)
inline

Definition at line 78 of file qdebug.h.

78 : stream(new Stream(t)) {}
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug ( const QDebug o)
inline

Definition at line 79 of file qdebug.h.

79 :stream(o.stream) { ++stream->ref; }
~QDebug ( )
inline

Definition at line 81 of file qdebug.h.

81  {
82  if (!--stream->ref) {
83  if(stream->message_output) {
84  QT_TRY {
85  qt_message_output(stream->type, stream->buffer.toLocal8Bit().data());
86  } QT_CATCH(std::bad_alloc&) { /* We're out of memory - give up. */ }
87  }
88  delete stream;
89  }
90  }

Member Function Documentation

QDebug & operator= ( const QDebug other)
inline

Definition at line 146 of file qdebug.h.

147 {
148  if (this != &other) {
149  QDebug copy(other);
150  qSwap(stream, copy.stream);
151  }
152  return *this;
153 }
Definition: qdebug.h:62
Q_INLINE_TEMPLATE void qSwap(QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
QDebug& space ( )
inline

Definition at line 91 of file qdebug.h.

91 { stream->space = true; stream->ts << ' '; return *this; }
QDebug& nospace ( )
inline

Definition at line 92 of file qdebug.h.

92 { stream->space = false; return *this; }
QDebug& maybeSpace ( )
inline

Definition at line 93 of file qdebug.h.

93 { if (stream->space) stream->ts << ' '; return *this; }
QDebug& operator<< ( QChar  t)
inline

Definition at line 95 of file qdebug.h.

95 { stream->ts << '\'' << t << '\''; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
QDebug& operator<< ( QBool  t)
inline

Definition at line 96 of file qdebug.h.

96 { stream->ts << (bool(t != 0) ? "true" : "false"); return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( bool  t)
inline

Definition at line 97 of file qdebug.h.

97 { stream->ts << (t ? "true" : "false"); return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( char  t)
inline

Definition at line 98 of file qdebug.h.

98 { stream->ts << t; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( signed short  t)
inline

Definition at line 99 of file qdebug.h.

99 { stream->ts << t; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( unsigned short  t)
inline

Definition at line 100 of file qdebug.h.

100 { stream->ts << t; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( signed int  t)
inline

Definition at line 101 of file qdebug.h.

101 { stream->ts << t; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( unsigned int  t)
inline

Definition at line 102 of file qdebug.h.

102 { stream->ts << t; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( signed long  t)
inline

Definition at line 103 of file qdebug.h.

103 { stream->ts << t; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( unsigned long  t)
inline

Definition at line 104 of file qdebug.h.

104 { stream->ts << t; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( qint64  t)
inline

Definition at line 105 of file qdebug.h.

106  { stream->ts << QString::number(t); return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
static QString number(int, int base=10)
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( quint64  t)
inline

Definition at line 107 of file qdebug.h.

108  { stream->ts << QString::number(t); return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
static QString number(int, int base=10)
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( float  t)
inline

Definition at line 109 of file qdebug.h.

109 { stream->ts << t; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( double  t)
inline

Definition at line 110 of file qdebug.h.

110 { stream->ts << t; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( const char *  t)
inline

Definition at line 111 of file qdebug.h.

111 { stream->ts << QString::fromAscii(t); return maybeSpace(); }
static QString fromAscii(const char *, int size=-1)
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( const QString t)
inline

Definition at line 112 of file qdebug.h.

112 { stream->ts << '\"' << t << '\"'; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
QDebug& operator<< ( const QStringRef t)
inline

Definition at line 113 of file qdebug.h.

113 { return operator<<(t.toString()); }
QDebug & operator<<(QChar t)
Definition: qdebug.h:95
QString toString() const
QDebug& operator<< ( const QLatin1String t)
inline

Definition at line 114 of file qdebug.h.

114 { stream->ts << '\"' << t.latin1() << '\"'; return maybeSpace(); }
const char * latin1() const
Definition: qstring.h:661
QDebug & maybeSpace()
Definition: qdebug.h:93
QDebug& operator<< ( const QByteArray t)
inline

Definition at line 115 of file qdebug.h.

115 { stream->ts << '\"' << t << '\"'; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
QDebug& operator<< ( const void t)
inline

Definition at line 116 of file qdebug.h.

116 { stream->ts << t; return maybeSpace(); }
QDebug & maybeSpace()
Definition: qdebug.h:93
GLdouble GLdouble t
Definition: GLee.h:1181
QDebug& operator<< ( QTextStreamFunction  f)
inline

Definition at line 117 of file qdebug.h.

117  {
118  stream->ts << f;
119  return *this;
120  }
GLclampf f
Definition: GLee.h:9303
QDebug& operator<< ( QTextStreamManipulator  m)
inline

Definition at line 122 of file qdebug.h.

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

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