diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-06 19:10:10 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-06 19:10:25 +0200 |
commit | 20cac3d9c9c22153e9e316daff32b6050ff6be6b (patch) | |
tree | b563a89475df9afb4f40841ec371be9488d5b1ed /src/corelib/doc/snippets/qdebug/qdebugsnippet.cpp | |
parent | 8ce85d74b692392a4ea0785360156f37418cff13 (diff) | |
parent | 9eb0b09abce28b11e4915fc9c3b3e996eb19cef2 (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: If9fd98525b6b4ca07e5e006fc98bf372a73b8a21
Diffstat (limited to 'src/corelib/doc/snippets/qdebug/qdebugsnippet.cpp')
-rw-r--r-- | src/corelib/doc/snippets/qdebug/qdebugsnippet.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/doc/snippets/qdebug/qdebugsnippet.cpp b/src/corelib/doc/snippets/qdebug/qdebugsnippet.cpp index f71d61ed47..a9ab83f5bf 100644 --- a/src/corelib/doc/snippets/qdebug/qdebugsnippet.cpp +++ b/src/corelib/doc/snippets/qdebug/qdebugsnippet.cpp @@ -51,11 +51,12 @@ public: }; //! [0] -QDebug operator<<(QDebug dbg, const Coordinate &c) +QDebug operator<<(QDebug debug, const Coordinate &c) { - dbg.nospace() << "(" << c.x() << ", " << c.y() << ")"; + QDebugStateSaver saver(debug); + debug.nospace() << '(' << c.x() << ", " << c.y() << ')'; - return dbg.space(); + return debug; } //! [0] |