From cd83859bd6310a2cf0a67c489aa597dc87e326b4 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 11 Feb 2015 10:22:01 +0100 Subject: Network: Fix operator<<(QDebug, ...) operations Use the QDebugStateSaver saver(debug); debug.resetFormat().nospace(); idiom to unify the formatting and whitespace handling. Change-Id: Id346d63b3f589b60ca19e4459271d587f1a0c003 Reviewed-by: Richard J. Moore --- src/network/socket/qlocalsocket.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/network/socket/qlocalsocket.cpp') diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp index f11972807b..990b282071 100644 --- a/src/network/socket/qlocalsocket.cpp +++ b/src/network/socket/qlocalsocket.cpp @@ -487,6 +487,8 @@ bool QLocalSocket::isSequential() const #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug debug, QLocalSocket::LocalSocketError error) { + QDebugStateSaver saver(debug); + debug.resetFormat().nospace(); switch (error) { case QLocalSocket::ConnectionRefusedError: debug << "QLocalSocket::ConnectionRefusedError"; @@ -527,6 +529,8 @@ QDebug operator<<(QDebug debug, QLocalSocket::LocalSocketError error) QDebug operator<<(QDebug debug, QLocalSocket::LocalSocketState state) { + QDebugStateSaver saver(debug); + debug.resetFormat().nospace(); switch (state) { case QLocalSocket::UnconnectedState: debug << "QLocalSocket::UnconnectedState"; -- cgit v1.2.3