diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-10 22:51:53 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-09-16 12:58:46 +0200 |
commit | 17ac23d7ada8a89cd36a71c74627f0d767049414 (patch) | |
tree | cb48383533691737502191550e20c8a189f9a6ee /src/imports/location/location.cpp | |
parent | f170e6edbd6960abd8bc0b269118211c515c8587 (diff) | |
download | qtlocation-17ac23d7ada8a89cd36a71c74627f0d767049414.tar.gz |
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>
Diffstat (limited to 'src/imports/location/location.cpp')
-rw-r--r-- | src/imports/location/location.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/imports/location/location.cpp b/src/imports/location/location.cpp index 77940087..8bc6c6f1 100644 --- a/src/imports/location/location.cpp +++ b/src/imports/location/location.cpp @@ -238,7 +238,6 @@ public: qmlRegisterType<QDeclarativeSearchResultModel, 12>(uri, major, minor, "PlaceSearchModel"); qmlRegisterType<QDeclarativeGeoMap, 12>(uri, major, minor, "Map"); qmlRegisterType<QDeclarativeGeoRoute, 12>(uri, major, minor, "Route"); - qmlRegisterType<QDeclarativeGeoRouteLeg, 12>(uri, major, minor, "RouteLeg"); minor = 13; qmlRegisterType<QDeclarativeGeoMap, 13>(uri, major, minor, "Map"); |