diff options
author | David Faure <faure@kde.org> | 2012-07-27 13:53:16 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-27 22:05:26 +0200 |
commit | 8cf7cf0cb96188b42e10958711f8c3aa016396c3 (patch) | |
tree | e8d30c34775aa5a4dc320a2c2ac535e2d6933beb /src/corelib/io/qdebug.cpp | |
parent | 54e3ce17053619a323cf5ba436773101da6fda23 (diff) |
QDebug: Add getter/setter for auto-insert-spaces.
This is useful for inserting a string without space-handling, given that
dbg.nospace() followed by dbg.space() inserts a space.
It's also useful for QDebug operators for custom types, so that they
can disable space handling and then restore to whatever it was before
(rather than forcing it to space() mode).
Change-Id: I9d72e9ffbcbc581ed093168752c29af924405b33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qdebug.cpp')
-rw-r--r-- | src/corelib/io/qdebug.cpp | 18 |
1 files changed, 18 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 |