QDebug: Add a doc section about formatting options

Change-Id: I43cb965f9f45e8a50c767c7e9035811c90e6aab3
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
This commit is contained in:
Kai Koehne 2014-06-20 14:46:42 +02:00
parent 5cb581b3b4
commit 4fb0ca4209

View File

@ -79,6 +79,18 @@ QT_BEGIN_NAMESPACE
used to write debugging information to files and other devices. The constructor 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. 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 \section1 Writing Custom Types to a Stream
Many standard types can be written to QDebug objects, and Qt provides support for Many standard types can be written to QDebug objects, and Qt provides support for