diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-07-27 23:24:20 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-07-28 16:53:24 +0200 |
commit | 46c9adfd30636a4b13f5b66bbe019e51033a5f0b (patch) | |
tree | e53a9cd098f3561c7fb6b0d5007e0df999a3fec7 /src/location/declarativemaps/qdeclarativegeoroutemodel.cpp | |
parent | fc78a32507ccaa6c101dca2cc7a4d4061acea94f (diff) |
Use 'const' correctly
Don't return or pass const copies, use either plain copies or const
references. Make getters const, make variables const, and use qAsConst
in ranged for loops to avoid detaches.
Pick-to: 6.2
Change-Id: If1463cf7f0077c08dedb15388d912b652c2b037c
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeoroutemodel.cpp')
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeoroutemodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp index 8275d762..6bec322b 100644 --- a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp +++ b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp @@ -863,7 +863,7 @@ void QDeclarativeGeoRouteQuery::setNumberAlternativeRoutes(int numberAlternative \sa waypointObjects, addWaypoint, removeWaypoint, clearWaypoints */ -QVariantList QDeclarativeGeoRouteQuery::waypoints() +QVariantList QDeclarativeGeoRouteQuery::waypoints() const { QVariantList res; @@ -881,7 +881,7 @@ QVariantList QDeclarativeGeoRouteQuery::waypoints() \sa waypointObjects, addWaypoint, removeWaypoint, clearWaypoints */ -QVariantList QDeclarativeGeoRouteQuery::waypointObjects() +QVariantList QDeclarativeGeoRouteQuery::waypointObjects() const { QVariantList res; |