summaryrefslogtreecommitdiff
path: root/src/location/doc/snippets/declarative/routing.qml
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-02 16:54:38 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-09 04:51:50 +0200
commit76e21e0fd44b7841f1502eddf87147fa773685a0 (patch)
treebdc968fb85060786eb96ef6064a4991f29ceae61 /src/location/doc/snippets/declarative/routing.qml
parent983b9729f18b1ab1d4734663dc15b4f79ffb08fb (diff)
downloadqtlocation-76e21e0fd44b7841f1502eddf87147fa773685a0.tar.gz
Remove QDeclarativeGeoRouteSegment wrapper
Register the QGeoRouteSegment gadget type directly as the routeSegment QML type (via a Foreign), and use it in QDeclarativeGeoRoute. The type is now uncreatable. It wasn't in 5.15, but since there is no setter-API that is exposed to QML, there is no reason to have it be a creatable type. Adjust the QML test to declare a property of type routeSegment instead. Move the QML type documentation into QGeoRouteSegment, and document the corresponding C++ properties via \property. Unify the language a bit, and follow up on the rename from RouteSegment to routeSegment. Pick-to: 6.2 Change-Id: I1ebae0c1a9d056aa59510a3ab539b1d8bce8c6c7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/location/doc/snippets/declarative/routing.qml')
-rw-r--r--src/location/doc/snippets/declarative/routing.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/location/doc/snippets/declarative/routing.qml b/src/location/doc/snippets/declarative/routing.qml
index 3027b22b..c09913c6 100644
--- a/src/location/doc/snippets/declarative/routing.qml
+++ b/src/location/doc/snippets/declarative/routing.qml
@@ -100,7 +100,7 @@ Item {
Text { text: hasManeuver ? modelData.maneuver.instructionText : "" }
//! [Route Maneuver List2]
property routeManeuver routeManeuver: modelData.maneuver
- property RouteSegment routeSegment: modelData
+ property routeSegment routeSegment: modelData
//! [routeManeuver]
Text {
@@ -109,11 +109,11 @@ Item {
}
//! [routeManeuver]
- //! [RouteSegment]
+ //! [routeSegment]
Text {
text: "Segment distance " + routeSegment.distance + " meters, " + routeSegment.path.length + " points."
}
- //! [RouteSegment]
+ //! [routeSegment]
//! [Route Maneuver List3]
}
}