summaryrefslogtreecommitdiff
path: root/src/positioning
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2017-03-09 16:37:29 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-03-09 23:16:59 +0000
commit495ea425b376f5b6d65a078c4699e4b7b60a145f (patch)
treea324a95a611ab4a49ed33abb0243734eaaceadd8 /src/positioning
parent40dbadbb7f6c863553c5474e1dcf8a4d7388a99f (diff)
downloadqtlocation-495ea425b376f5b6d65a078c4699e4b7b60a145f.tar.gz
Increase the QGeoCoordinate debug operator precision
The current precision of 6 digits only ever guarantees 110m on Earth. That's not sufficient for some use cases. A precision of 11 guarantees at least 8 digits after the comma since there are at most three digits before the comma. The 8th digit reflects a geographical precision of 1.1 mm on earth. More precision for navigation purposes is not needed. Task-number: QTBUG-59259 Change-Id: I4f59c152171c3a71f22aa7520718d0fcb611b697 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/positioning')
-rw-r--r--src/positioning/qgeocoordinate.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/positioning/qgeocoordinate.cpp b/src/positioning/qgeocoordinate.cpp
index b0d9fc0f..7a286f8a 100644
--- a/src/positioning/qgeocoordinate.cpp
+++ b/src/positioning/qgeocoordinate.cpp
@@ -680,6 +680,8 @@ QDebug operator<<(QDebug dbg, const QGeoCoordinate &coord)
double lat = coord.latitude();
double lng = coord.longitude();
+ QTextStreamManipulator tsm = qSetRealNumberPrecision(11);
+ dbg << tsm;
dbg.nospace() << "QGeoCoordinate(";
if (qIsNaN(lat))
dbg << '?';