diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index c4be5955c8e..55be6d13a48 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -436,7 +436,7 @@ template inline QDebugIfHasDebugStream operator<<(QDebug debug, const std::pair &pair) { const QDebugStateSaver saver(debug); - debug.nospace() << "std::pair(" << pair.first << ',' << pair.second << ')'; + debug.nospace() << "std::pair(" << pair.first << ", " << pair.second << ')'; return debug; } diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp index 1e76340b05a..107bf1f2c98 100644 --- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp +++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp @@ -704,7 +704,7 @@ void tst_QDebug::qDebugStdPair() const file = __FILE__; line = __LINE__ - 5; function = Q_FUNC_INFO; #endif QCOMPARE(s_msgType, QtDebugMsg); - QCOMPARE(s_msg, R"(std::pair(42,"foo") std::pair("barbaz",4.2) std::pair(baz,-42))"_L1); + QCOMPARE(s_msg, R"(std::pair(42, "foo") std::pair("barbaz", 4.2) std::pair(baz, -42))"_L1); QCOMPARE(s_file, file); QCOMPARE(s_line, line); QCOMPARE(s_function, function); @@ -712,7 +712,7 @@ void tst_QDebug::qDebugStdPair() const /* simpler tests from now on */ // nested: qDebug() << std::pair(std::pair(std::pair(4.2, 42), ".42"), u"42"_s); - QCOMPARE(s_msg, R"(std::pair(std::pair(std::pair(4.2,42),.42),"42"))"_L1); + QCOMPARE(s_msg, R"(std::pair(std::pair(std::pair(4.2, 42), .42), "42"))"_L1); } void tst_QDebug::qDebugStdString() const