QDebug: normalize std::pair output separator

All other container stream operators use COMMA SP, while std::pair
used COMMA w/o SP.

Add the space to make the output a bit more readable, and for
consistency.

[ChangeLog][QtCore][QDebug] The output of a streamed std::pair has now
a space after the separating comma, like for other containers.

Change-Id: I01f83509038566cb9369d7ec743751b2ccc0903a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2024-10-21 14:42:06 +02:00
parent defd1549de
commit c1cb30f85b
2 changed files with 3 additions and 3 deletions

View File

@ -436,7 +436,7 @@ template <class T1, class T2>
inline QDebugIfHasDebugStream<T1, T2> operator<<(QDebug debug, const std::pair<T1, T2> &pair) inline QDebugIfHasDebugStream<T1, T2> operator<<(QDebug debug, const std::pair<T1, T2> &pair)
{ {
const QDebugStateSaver saver(debug); const QDebugStateSaver saver(debug);
debug.nospace() << "std::pair(" << pair.first << ',' << pair.second << ')'; debug.nospace() << "std::pair(" << pair.first << ", " << pair.second << ')';
return debug; return debug;
} }