diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qdebug.cpp | 11 | ||||
-rw-r--r-- | src/corelib/io/qdebug.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index 4d56d1a179..ce549eda6b 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -476,6 +476,17 @@ QDebug &QDebug::resetFormat() */ /*! + \fn QDebug &QDebug::verbosity(int verbosityLevel) + \since 5.13 + + Sets the verbosity of the stream to \a verbosityLevel and returns a reference to the stream. + + The allowed range is from 0 to 7. The default value is 2. + + \sa verbosity(), setVerbosity() +*/ + +/*! \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 9d1ce51da5..07a0228168 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -123,6 +123,7 @@ public: inline QDebug &space() { stream->space = true; stream->ts << ' '; return *this; } inline QDebug &nospace() { stream->space = false; return *this; } inline QDebug &maybeSpace() { if (stream->space) stream->ts << ' '; return *this; } + inline QDebug &verbosity(int verbosityLevel) { setVerbosity(verbosityLevel); return *this; } int verbosity() const { return stream->verbosity(); } void setVerbosity(int verbosityLevel) { stream->setVerbosity(verbosityLevel); } @@ -195,6 +196,7 @@ public: inline QNoDebug "e() { return *this; } inline QNoDebug &noquote() { return *this; } inline QNoDebug &maybeQuote(const char = '"') { return *this; } + inline QNoDebug &verbosity(int) { return *this; } template<typename T> inline QNoDebug &operator<<(const T &) { return *this; } |