summaryrefslogtreecommitdiff
path: root/src/positioning/qdoublevector3d.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-04-01 16:34:51 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-04-01 18:19:52 +0000
commite589217bbf671a738a055652a1b19cfaa6f32099 (patch)
tree2fc5fc717b6776650245ef0f544d90ad9d45ced6 /src/positioning/qdoublevector3d.cpp
parent2d467627ea371af16ef39498b748fe1843d8d89a (diff)
downloadqtlocation-e589217bbf671a738a055652a1b19cfaa6f32099.tar.gz
Use QDebugStateSaver to restore space setting in stream operators.
Returning dbg.space() breaks formatting on streams that already have nospace() set. Change-Id: I1ced3c46e18aba788298b6d9f60737b1004c6e9c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/positioning/qdoublevector3d.cpp')
-rw-r--r--src/positioning/qdoublevector3d.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/positioning/qdoublevector3d.cpp b/src/positioning/qdoublevector3d.cpp
index 1c7066db..5e7ca936 100644
--- a/src/positioning/qdoublevector3d.cpp
+++ b/src/positioning/qdoublevector3d.cpp
@@ -104,9 +104,10 @@ double QDoubleVector3D::length() const
QDebug operator<<(QDebug dbg, const QDoubleVector3D &vector)
{
+ QDebugStateSaver saver(dbg);
dbg.nospace() << "QDoubleVector3D("
<< vector.x() << ", " << vector.y() << ", " << vector.z() << ')';
- return dbg.space();
+ return dbg;
}
#endif