From 2bf874e5e2b6a08ee12d0810d67d3c7ecf1e4bfa Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Fri, 1 Mar 2019 12:45:19 +0100 Subject: 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 --- src/positioning/qgeopath.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 { -- cgit v1.2.1