From 3203ac3f4e245427902bd912cb0c644c7e870657 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 30 Mar 2015 14:24:21 +0200 Subject: Use QDebugStateSaver to restore space setting in stream operators. Returning dbg.space() breaks formatting on streams that already have nospace() set. Change-Id: I55e38b018679a67eb40be6b4664505483a3a7d8e Reviewed-by: David Faure --- src/opengl/qgl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/opengl') diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index ca133f8830..5aec058532 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1615,6 +1615,7 @@ QDebug operator<<(QDebug dbg, const QGLFormat &f) { const QGLFormatPrivate * const d = f.d; + QDebugStateSaver saver(dbg); dbg.nospace() << "QGLFormat(" << "options " << d->opts << ", plane " << d->pln @@ -1632,7 +1633,7 @@ QDebug operator<<(QDebug dbg, const QGLFormat &f) << ", profile " << d->profile << ')'; - return dbg.space(); + return dbg; } #endif -- cgit v1.2.3