![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtCore More...
\inmodule QtCore
Convenience class for custom QDebug operators.
Saves the settings used by QDebug, and restores them upon destruction, then calls \l {QDebug::maybeSpace()}{maybeSpace()}, to separate arguments with a space if \l {QDebug::autoInsertSpaces()}{autoInsertSpaces()} was true at the time of constructing the QDebugStateSaver.
The automatic insertion of spaces between writes is one of the settings that QDebugStateSaver stores for the duration of the current block.
The settings of the internal QTextStream are also saved and restored, so that using << Qt::hex in a QDebug operator doesn't affect other QDebug operators.
QDebugStateSaver is typically used in the implementation of an operator<<() for debugging: