Merge QGeoRouteLeg into QGeoRoute


QGeoRouteLeg was a subclass of QGeoRoute. Since QGeoRoute is a value
type, subclassing is problematic, even though QGeoRouteLeg had no data
of its own and only added public getters for data already carried by
QGeoRoutePrivate.

But if every leg is a route, with documentation pointing out that some
route-specific getters never return anything, then it's easier to just
add leg-specific APIs to QGeoRoute. A route is then a group of other
routes. Those route legs point back at the overall route, and know of
index within the overall route. Those leg-specific APIs return -1 for
the index and an empty overall route if the route is not a leg within
an overall route.

This saves a separate type with its own QDeclarative* wrapper, without
losing any expressiveness.

Task-number: QTBUG-105206
Change-Id: I8844290d245ed79215e6c7893d972e0da96ed197
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commit17ac23d7ada8a89cd36a71c74627f0d767049414
parentf170e6edbd6960abd8bc0b269118211c515c8587
authorVolker Hilsheimer <volker.hilsheimer@qt.io>
committerVolker Hilsheimer <volker.hilsheimer@qt.io>
commit timeFri, 16 Sep 2022 12:58:46 +0200