From 868201155fd677dbc6d14346f5ea61e82ebce27b Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 23 Jan 2015 16:19:11 +0100 Subject: QtCore: Use QDebugStateSaver in (almost) all QDebug operator<< Unify the behavior of the different operator<< by always using QDebugStateSaver (appending an optional space at exit), and making sure that the space(), nospace() setting isn't 'leaked'. Change-Id: I38e4f82fa6f7419d8b5edfc4dc37495af497e8ac Reviewed-by: Alex Blasche --- src/corelib/io/qurl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/corelib/io') diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index eb97eaf6d6..9c739140d7 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3904,8 +3904,9 @@ QDataStream &operator>>(QDataStream &in, QUrl &url) #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug d, const QUrl &url) { - d.maybeSpace() << "QUrl(" << url.toDisplayString() << ')'; - return d.space(); + QDebugStateSaver saver(d); + d.nospace() << "QUrl(" << url.toDisplayString() << ')'; + return d; } #endif -- cgit v1.2.3