diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2019-03-01 12:45:19 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2019-03-19 09:25:21 +0000 |
commit | 2bf874e5e2b6a08ee12d0810d67d3c7ecf1e4bfa (patch) | |
tree | d86bbec91d28ece4d239216adaa33ef55f847a59 | |
parent | 0f544f67042490e2a5448616601ed28322214c57 (diff) | |
download | qtlocation-2bf874e5e2b6a08ee12d0810d67d3c7ecf1e4bfa.tar.gz |
Document QGeoPath::length behavior
By default, the method computes a closed-loop length.
Being this public API, the only thing that can be done is to properly
document the behavior.
[ChangeLog][QtPositioning] Documented QGeoPath::length behavior properly.
Change-Id: Ie48a51ab0d11ec68851c2ea26b8c6f6894be8b61
Fixes: QTBUG-71358
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/positioning/qgeopath.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/positioning/qgeopath.cpp b/src/positioning/qgeopath.cpp index 0c3d0c1c..c4b13d01 100644 --- a/src/positioning/qgeopath.cpp +++ b/src/positioning/qgeopath.cpp @@ -292,6 +292,10 @@ QGeoPath QGeoPath::translated(double degreesLatitude, double degreesLongitude) c /*! Returns the length of the path, in meters, from the element \a indexFrom to the element \a indexTo. The length is intended to be the sum of the shortest distances for each pair of adjacent points. + + If \a indexTo is -1 (the default value), the length will be including the distance between last coordinate + and the first (closed loop). + To retrieve the length for the path, use 0 for \a indexFrom and \l QGeoPath::size() - 1 for \a indexTo. */ double QGeoPath::length(int indexFrom, int indexTo) const { |