diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qdebug.cpp | 18 | ||||
-rw-r--r-- | src/corelib/io/qdebug.h | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index 2b5dac8801..07f359672c 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -162,6 +162,24 @@ */ /*! + \fn bool QDebug::autoInsertSpaces() + + Returns true if this QDebug instance will automatically insert spaces + between writes. + + \since 5.0 +*/ + +/*! + \fn void QDebug::setAutoInsertSpaces(bool b) + + Enables automatic insertion of spaces between writes if \a b is true; otherwise + automatic insertion of spaces is disabled. + + \since 5.0 +*/ + +/*! \fn QDebug &QDebug::operator<<(QChar t) Writes the character, \a t, to the stream and returns a reference to the diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index 4d546a9ca1..8bc4128a95 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -97,6 +97,9 @@ public: inline QDebug &nospace() { stream->space = false; return *this; } inline QDebug &maybeSpace() { if (stream->space) stream->ts << ' '; return *this; } + bool autoInsertSpaces() const { return stream->space; } + void setAutoInsertSpaces(bool b) { stream->space = b; } + inline QDebug &operator<<(QChar t) { stream->ts << '\'' << t << '\''; return maybeSpace(); } inline QDebug &operator<<(bool t) { stream->ts << (t ? "true" : "false"); return maybeSpace(); } inline QDebug &operator<<(char t) { stream->ts << t; return maybeSpace(); } |