summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2014-06-20 14:46:42 +0200
committerKai Koehne <kai.koehne@digia.com>2014-07-22 14:45:27 +0200
commit4fb0ca420954e48494e501bdce518c87346af656 (patch)
tree2d623752ddecbf6899681d30c23df0f0b69d813c /src/corelib/io/qdebug.cpp
parent5cb581b3b4c3305a0dfebead1ec7049ab6f2ebc4 (diff)
QDebug: Add a doc section about formatting options
Change-Id: I43cb965f9f45e8a50c767c7e9035811c90e6aab3 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/corelib/io/qdebug.cpp')
-rw-r--r--src/corelib/io/qdebug.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp
index ef9c654266..56c46d69c9 100644
--- a/src/corelib/io/qdebug.cpp
+++ b/src/corelib/io/qdebug.cpp
@@ -79,6 +79,18 @@ QT_BEGIN_NAMESPACE
used to write debugging information to files and other devices. The constructor
that accepts a QString is used to write to a string for display or serialization.
+ \section1 Formatting Options
+
+ QDebug formats output so that it's easily readable. It automatically adds spaces
+ between arguments, and adds quotes around QString, QByteArray, QChar arguments.
+
+ You can tweak these options through the space(), nospace() and quote(), noquote()
+ methods. Furthermore, \l{QTextStream manipulators} can be piped into a QDebug
+ stream.
+
+ QDebugStateSaver limits changes to the formatting to the current scope.
+ resetFormat() resets the options to the default ones.
+
\section1 Writing Custom Types to a Stream
Many standard types can be written to QDebug objects, and Qt provides support for