diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-03-30 14:24:21 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-03-30 12:59:58 +0000 |
commit | 3203ac3f4e245427902bd912cb0c644c7e870657 (patch) | |
tree | 9c5bf3dc0b22d59bc683a5cbccadc2a82e27644b /src/gui/painting/qpen.cpp | |
parent | c7b003ea3b8b4b7124d4971df7d910f2bc3fc4fa (diff) |
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 <david.faure@kdab.com>
Diffstat (limited to 'src/gui/painting/qpen.cpp')
-rw-r--r-- | src/gui/painting/qpen.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp index 4796d2c0ad..6263d18b01 100644 --- a/src/gui/painting/qpen.cpp +++ b/src/gui/painting/qpen.cpp @@ -1026,12 +1026,13 @@ QDebug operator<<(QDebug dbg, const QPen &p) "CustomDashLine" }; + QDebugStateSaver saver(dbg); dbg.nospace() << "QPen(" << p.width() << ',' << p.brush() << ',' << PEN_STYLES[p.style()] << ',' << int(p.capStyle()) << ',' << int(p.joinStyle()) << ',' << p.dashPattern() << ',' << p.dashOffset() << ',' << p.miterLimit() << ')'; - return dbg.space(); + return dbg; } #endif |