summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-05 03:03:57 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-05 03:03:57 +0200
commitb44858e1e78820ce1139ee656a1892fb12c4799c (patch)
tree25a549413e57e096caa1b3a3b8240c4c91e8d5ec
parentefdf3c266dce8791b78d1a851b16d2f4dbe8534e (diff)
parent25a220dd7370acdf04ee8f6d2d59f25d81cf42c7 (diff)
downloadqtlocation-b44858e1e78820ce1139ee656a1892fb12c4799c.tar.gz
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I219a1353a21d29177e0cd7f21d64c06a8f28fced
-rw-r--r--examples/positioning/geoflickr/doc/src/geoflickr.qdoc46
-rw-r--r--src/imports/positioning/locationsingleton.cpp7
-rw-r--r--src/location/declarativemaps/qdeclarativegeomap.cpp2
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroute.cpp6
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutemodel.cpp29
-rw-r--r--src/location/declarativemaps/qdeclarativepolygonmapitem.cpp2
-rw-r--r--src/location/declarativemaps/qdeclarativepolylinemapitem.cpp2
-rw-r--r--src/location/doc/qtlocation.qdocconf2
-rw-r--r--src/location/labs/qdeclarativenavigator.cpp27
-rw-r--r--src/positioning/doc/qtpositioning.qdocconf2
-rw-r--r--src/positioning/doc/src/qtpositioning.qdoc8
-rw-r--r--src/positioning/positioning.pro2
-rw-r--r--src/positioning/qgeolocation.cpp3
-rw-r--r--src/positioning/qgeopolygon.cpp17
-rw-r--r--src/positioningquick/qdeclarativegeoaddress.cpp1
-rw-r--r--src/positioningquick/qdeclarativegeolocation.cpp1
-rw-r--r--src/positioningquick/qdeclarativepositionsource_p.h4
-rw-r--r--src/positioningquick/qquickgeocoordinateanimation.cpp1
18 files changed, 97 insertions, 65 deletions
diff --git a/examples/positioning/geoflickr/doc/src/geoflickr.qdoc b/examples/positioning/geoflickr/doc/src/geoflickr.qdoc
index de74a9d6..14d6e88a 100644
--- a/examples/positioning/geoflickr/doc/src/geoflickr.qdoc
+++ b/examples/positioning/geoflickr/doc/src/geoflickr.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -30,12 +30,12 @@
\title GeoFlickr (QML)
\ingroup qtpositioning-examples
- \brief The GeoFlickr example shows how to use the user's current position to
- fetch local content from a web service.
+ \brief The GeoFlickr example shows how to use the user's current
+ position to fetch local content from a web service.
- This is a small example, illustrating one of the very core parts of the
- \l{Qt Positioning} API: the ability to retrieve and use the user's current
- geographic position.
+ This is a small example, illustrating one of the very core parts
+ of the \l{Qt Positioning} API: the ability to retrieve and use the
+ user's current geographic position.
Key QML types shown in this example:
\list
@@ -50,38 +50,38 @@
\section1 Retrieving the Current Position
Retrieving the user's current position is achieved using the PositionSource
- type. In this example, we instantiate the PositionSource as part of the
- GeoTab component (the floating "window" describing current position and
- status).
+ type. In this example, we instantiate the PositionSource as part
+ of the GeoTab component (the floating "window" describing current
+ position and status).
\snippet geoflickr/flickrmobile/GeoTab.qml possrc
- When the "Locate and update" button is pressed, we first interrogate the
- PositionSource to check if it has an available backend for positioning
- data. If it does not, we fall back to using a pre-recorded NMEA log
- for demonstration. We then instruct the PositionSource to update.
+ When the "Locate and update" button is pressed, we first interrogate
+ the PositionSource to check if it has an available backend for
+ positioning data. If it does not, we fall back to using a pre-recorded
+ NMEA log for demonstration. We then instruct the PositionSource to update.
\snippet geoflickr/flickrmobile/GeoTab.qml locatebutton-top
\snippet geoflickr/flickrmobile/GeoTab.qml locatebutton-clicked
- To share the new position data with the rest of the application, we use
- properties that we have created on the GeoTab component:
+ To share the new position data with the rest of the application, we
+ use properties that we have created on the GeoTab component:
\snippet geoflickr/flickrmobile/GeoTab.qml props
\section1 Using the Current Position
- The longitude and latitude values retrieved here are eventually set on
- in properties on the RestModel component. The RestModel is an XmlListModel,
- which retrieves XML data from a URL and creates a data model by performing
- XPath queries on it.
+ The longitude and latitude values retrieved here are eventually set
+ in the properties on the RestModel component. The RestModel is an
+ XmlListModel, which retrieves XML data from a URL and creates a data
+ model by performing XPath queries on it.
- In this case, it retrieves data from the Flickr REST API online, based on
- our current position
+ In this case, it retrieves data from the Flickr REST API online,
+ based on our current position
\snippet geoflickr/flickrcommon/RestModel.qml restmodel
- This model data is then shown in a variety of Qt Quick views to produce
- the example application.
+ This model data is then shown in a variety of Qt Quick views to
+ produce the example application.
*/
diff --git a/src/imports/positioning/locationsingleton.cpp b/src/imports/positioning/locationsingleton.cpp
index 8f810d94..5bc848f3 100644
--- a/src/imports/positioning/locationsingleton.cpp
+++ b/src/imports/positioning/locationsingleton.cpp
@@ -97,7 +97,7 @@ QGeoCoordinate LocationSingleton::coordinate() const
}
/*!
- \qmlmethod coordinate QtPositioning::coordinate(real latitude, real longitue, real altitude) const
+ \qmlmethod coordinate QtPositioning::coordinate(real latitude, real longitude, real altitude) const
Constructs a coordinate with the specified \a latitude, \a longitude and optional \a altitude.
Both \a latitude and \a longitude must be valid, otherwise an invalid coordinate is returned.
@@ -151,7 +151,7 @@ QGeoRectangle LocationSingleton::rectangle(const QGeoCoordinate &center,
\qmlmethod georectangle QtPositioning::rectangle(coordinate topLeft, coordinate bottomRight) const
Constructs a georectangle with its top left corner positioned at \a topLeft and its bottom
- right corner positioned at \a {bottomLeft}.
+ right corner positioned at \a {bottomRight}.
\sa {georectangle}
*/
@@ -376,8 +376,7 @@ QGeoCoordinate LocationSingleton::mercatorToCoord(const QPointF &mercator) const
/*!
\qmlmethod point QtPositioning::coordToMercator(coordinate coord) const
- Converts a coordinate into a mercator coordinate.
-
+ Converts a coordinate \a coord into a mercator coordinate and returns it.
\sa {mercatorToCoord}
\since 5.12
*/
diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp
index 4f7c3945..1da71fb2 100644
--- a/src/location/declarativemaps/qdeclarativegeomap.cpp
+++ b/src/location/declarativemaps/qdeclarativegeomap.cpp
@@ -1303,7 +1303,7 @@ QGeoCoordinate QDeclarativeGeoMap::center() const
\l zoomLevel of the map. Any previously set value to those
properties will be overridden.
- This property does not provide any change notifications.
+ \note Since Qt 5.14 This property provides change notifications.
\since 5.6
*/
diff --git a/src/location/declarativemaps/qdeclarativegeoroute.cpp b/src/location/declarativemaps/qdeclarativegeoroute.cpp
index c536b65b..c1f5264b 100644
--- a/src/location/declarativemaps/qdeclarativegeoroute.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoroute.cpp
@@ -385,9 +385,9 @@ QQmlPropertyMap *QDeclarativeGeoRoute::extendedAttributes() const
/*!
\qmlmethod bool QtLocation::Route::equals(Route other)
- This method performs a deep comparison between this route and \a other.
-
- Returns \c true if the routes are considered equal, \c false otherwise.
+ This method performs deep comparison if the present route
+ is identical to the \a other route.
+ Returns \c true if the routes are equal.
\since 5.12
*/
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
index f74557c0..bbfa9b57 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
@@ -117,8 +117,9 @@ static QList<QVariantMap> waypointMetadata(const QList<QDeclarativeGeoWaypoint *
geographic routes from a backend provider. Routes include data about driving
directions between two points, walking directions with multiple waypoints,
and various other similar concepts. It functions much like other Model
- types in QML (see for example \l {Models and Views in Qt Quick#Models}{ListModel}),
- and interacts with views such as \l MapItemView, and \l{ListView}.
+ types in QML (see for example \l {Models and Views in Qt Quick#Models}{ListModel}
+ and \l {QtQuick.XmlListModel::XmlListModel}{XmlListModel}), and interacts with
+ views such as \l MapItemView, and \l{ListView}.
Like \l Map and \l GeocodeModel, all the data for a RouteModel to work comes
from a services plugin. This is contained in the \l{plugin} property, and
@@ -243,11 +244,12 @@ void QDeclarativeGeoRouteModel::cancel()
/*!
\qmlmethod Route QtLocation::RouteModel::get(int index)
- Returns the Route at given \a index. Use \l count property to check the
- amount of routes available. The routes are indexed from zero, so the accessible range
- is 0...(count - 1).
+ Returns the Route at the specified index \a int. Use the \l count
+ property to check the amount of routes available. The routes
+ are indexed from zero, so the accessible range is 0...(count - 1).
- If you access out of bounds, a zero (null object) is returned and a warning is issued.
+ If you access out of bounds, a zero (null object) is returned and
+ a warning is issued.
*/
QDeclarativeGeoRoute *QDeclarativeGeoRouteModel::get(int index)
@@ -993,8 +995,9 @@ void QDeclarativeGeoRouteQuery::setExcludedAreas(const QJSValue &value)
/*!
\qmlmethod void QtLocation::RouteQuery::addExcludedArea(georectangle area)
- Adds the given \a area to excluded areas (areas that the route must not cross).
- Same area can only be added once.
+ Adds the specified \a georectangle from the excluded areas
+ (areas that the route must not cross).
+ The same area can only be added once.
\sa removeExcludedArea, clearExcludedAreas
*/
@@ -1117,9 +1120,9 @@ void QDeclarativeGeoRouteQuery::addWaypoint(const QVariant &waypoint)
/*!
\qmlmethod void QtLocation::RouteQuery::removeWaypoint(coordinate)
- Removes the given \a coordinate from the list of waypoints. If the same
- coordinate appears multiple times, the most recently added coordinate
- instance is removed.
+ Removes the given \a coordinate from the list of waypoints. If the
+ same coordinate appears multiple times, the most recently added
+ coordinate instance is removed.
\sa addWaypoint, clearWaypoints
*/
@@ -1197,8 +1200,8 @@ void QDeclarativeGeoRouteQuery::flushWaypoints(QList<QDeclarativeGeoWaypoint *>
/*!
\qmlmethod void QtLocation::RouteQuery::setFeatureWeight(FeatureType feature, FeatureWeight weight)
- Defines the \a weight to associate with a \a feature during the planning of a
- route.
+ Defines the weight (\a FeatureWeight) to associate with a feature
+ (\a FeatureType) during the planning of a route.
Following lists the possible feature weights:
diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
index 7a3873a4..86ff04af 100644
--- a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
+++ b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
@@ -413,7 +413,7 @@ void QDeclarativePolygonMapItem::setPath(const QJSValue &value)
/*!
\qmlmethod void MapPolygon::addCoordinate(coordinate)
- Adds a \a coordinate to the path.
+ Adds the specified \a coordinate to the path.
\sa removeCoordinate, path
*/
diff --git a/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp b/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
index 5ca612db..10f3f0c3 100644
--- a/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
+++ b/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
@@ -860,7 +860,7 @@ int QDeclarativePolylineMapItem::pathLength() const
/*!
\qmlmethod void MapPolyline::addCoordinate(coordinate)
- Adds a \a coordinate to the end of the path.
+ Adds the specified \a coordinate to the end of the path.
\sa insertCoordinate, removeCoordinate, path
*/
diff --git a/src/location/doc/qtlocation.qdocconf b/src/location/doc/qtlocation.qdocconf
index 0ffbe4d6..e5cf230b 100644
--- a/src/location/doc/qtlocation.qdocconf
+++ b/src/location/doc/qtlocation.qdocconf
@@ -33,7 +33,7 @@ qhp.QtLocation.subprojects.examples.selectors = fake:example
tagfile = ../../../doc/qtlocation/qtlocation.tags
-depends += qtcore qtdoc qtgui qtquick qtqml qtnetwork qtpositioning qtquickcontrols qtlinguist qtxmlpatterns
+depends += qtcore qtdoc qtgui qtquick qtqml qtnetwork qtpositioning qtquickcontrols qtlinguist
headerdirs += .. \
../../imports/location
diff --git a/src/location/labs/qdeclarativenavigator.cpp b/src/location/labs/qdeclarativenavigator.cpp
index ae273774..b266779c 100644
--- a/src/location/labs/qdeclarativenavigator.cpp
+++ b/src/location/labs/qdeclarativenavigator.cpp
@@ -158,6 +158,33 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ \qmlproperty bool Qt.labs.location::Navigator::automaticReroutingEnabled
+
+ This property tells whether the Navigator should automatically recalculate
+ the route when the position from \l positionSource ends too far from the route.
+ The operation performed in such case is equivalent to calling \l recalculateRoutes.
+ The default value is \c true.
+
+ \note Whether this property has any effect is plugin-dependent.
+ Also, whether or not it has an effect while the navigator is active is plugin-dependent.
+*/
+
+/*!
+ \qmlproperty bool Qt.labs.location::Navigator::isOnRoute
+
+ While the Navigator is in active tracking mode, this property tells
+ whether the position from \l positionSource is on the route or not.
+*/
+
+/*!
+ \qmlmethod void Qt.labs.location::Navigator::recalculateRoutes()
+
+ Calling this method forces the backend to trigger a routes recalculation.
+
+ \sa automaticReroutingEnabled
+*/
+
+/*!
\qmlproperty enumeration Qt.labs.location::Navigator::error
\readonly
diff --git a/src/positioning/doc/qtpositioning.qdocconf b/src/positioning/doc/qtpositioning.qdocconf
index 41a06c49..968f9b31 100644
--- a/src/positioning/doc/qtpositioning.qdocconf
+++ b/src/positioning/doc/qtpositioning.qdocconf
@@ -33,7 +33,7 @@ qhp.QtPositioning.subprojects.examples.selectors = fake:example
tagfile = ../../../doc/qtpositioning/qtpositioning.tags
-depends += qtcore qtdoc qtquick qtqml qtnetwork qtlocation
+depends += qtcore qtdoc qtquick qtqml qtnetwork qtlocation qtxmlpatterns
headerdirs += .. \
../../imports/positioning \
diff --git a/src/positioning/doc/src/qtpositioning.qdoc b/src/positioning/doc/src/qtpositioning.qdoc
index 7c30ef07..970bc7bd 100644
--- a/src/positioning/doc/src/qtpositioning.qdoc
+++ b/src/positioning/doc/src/qtpositioning.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -69,9 +69,9 @@ Currently the API is supported on \l {Qt for Android}{Android}, \l {Qt for iOS}{
\l {Qt for Linux/X11}{Linux} (using
\l {http://www.freedesktop.org/wiki/Software/GeoClue}{GeoClue version 0.12.99}),
\l {Qt for Windows}{Windows} (with GPS receivers exposed as a serial port providing NMEA sentences),
-and \l {Qt for WinRT}{WinRT} (using Windows.Devices.Geolocation). Note that the \l {Qt for WinRT}{WinRT}
-implementation can also be used in Win32 Desktop uses cases if the underlying platform is Windows 10
-or later.
+and \l {Qt for UWP}{UWP (Universal Windows Platform)} (using \c {Windows.Devices.Geolocation}).
+The Qt for UWP implementation can also be used in Win32 Desktop use cases if the underlying
+platform is Windows 10, or later.
\section1 Overview
diff --git a/src/positioning/positioning.pro b/src/positioning/positioning.pro
index 1eff0ab2..06e2d531 100644
--- a/src/positioning/positioning.pro
+++ b/src/positioning/positioning.pro
@@ -14,7 +14,7 @@ ANDROID_BUNDLED_JAR_DEPENDENCIES = \
ANDROID_PERMISSIONS = \
android.permission.ACCESS_FINE_LOCATION
ANDROID_LIB_DEPENDENCIES = \
- plugins/position/libqtposition_android.so
+ plugins/position/libplugins_position_qtposition_android.so
MODULE_WINRT_CAPABILITIES_DEVICE += \
location
MODULE_PLUGIN_TYPES = \
diff --git a/src/positioning/qgeolocation.cpp b/src/positioning/qgeolocation.cpp
index dd34112f..7d826e84 100644
--- a/src/positioning/qgeolocation.cpp
+++ b/src/positioning/qgeolocation.cpp
@@ -206,7 +206,8 @@ QVariantMap QGeoLocation::extendedAttributes() const
}
/*!
- Sets the extended attributes of the location.
+ Sets the extended attributes of the location with the
+ parameters specified in \a data.
\since 5.13
*/
diff --git a/src/positioning/qgeopolygon.cpp b/src/positioning/qgeopolygon.cpp
index 4e902be5..04e09095 100644
--- a/src/positioning/qgeopolygon.cpp
+++ b/src/positioning/qgeopolygon.cpp
@@ -117,7 +117,8 @@ QGeoPolygon::QGeoPolygon()
}
/*!
- Constructs a new geo \a polygon from a list of coordinates.
+ Constructs a new geo \a polygon from the coordinates specified
+ in \a path.
*/
QGeoPolygon::QGeoPolygon(const QList<QGeoCoordinate> &path)
: QGeoShape(new QGeoPolygonPrivate(path))
@@ -178,7 +179,7 @@ bool QGeoPolygon::operator!=(const QGeoPolygon &other) const
}
/*!
- Sets the \a polygon's boundary from a list of coordinates.
+ Sets the \a path for the polygon.
*/
void QGeoPolygon::setPath(const QList<QGeoCoordinate> &path)
{
@@ -196,7 +197,9 @@ const QList<QGeoCoordinate> &QGeoPolygon::path() const
}
/*!
- Sets all the elements of the polygon's perimeter.
+ Sets all the elements of the polygon's perimeter
+ based on a list of coordinates (\a path).
+.
\since QtPositioning 5.12
*/
@@ -355,7 +358,8 @@ QString QGeoPolygon::toString() const
}
/*!
- Sets the \a path for a hole inside the polygon. The hole is a QVariant containing a QList<QGeoCoordinate>.
+ Sets the \a holePath for a hole inside the polygon. The hole is a
+ QVariant containing a QList<QGeoCoordinate>.
\since 5.12
*/
@@ -375,7 +379,7 @@ void QGeoPolygon::addHole(const QVariant &holePath)
}
/*!
- Overloaded method. Sets the \a path for a hole inside the polygon. The hole is a QList<QGeoCoordinate>.
+ Overloaded method. Sets the \a holePath for a hole inside the polygon. The hole is a QList<QGeoCoordinate>.
\since 5.12
*/
@@ -386,7 +390,8 @@ void QGeoPolygon::addHole(const QList<QGeoCoordinate> &holePath)
}
/*!
- Returns a QVariant containing a QVariant containing a QList<QGeoCoordinate> which represents the hole at index.
+ Returns a QVariant containing a QVariant containing a QList<QGeoCoordinate>
+ which represents the hole at \a index.
\since 5.12
*/
diff --git a/src/positioningquick/qdeclarativegeoaddress.cpp b/src/positioningquick/qdeclarativegeoaddress.cpp
index 470a4c12..14403581 100644
--- a/src/positioningquick/qdeclarativegeoaddress.cpp
+++ b/src/positioningquick/qdeclarativegeoaddress.cpp
@@ -43,7 +43,6 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype Address
- \instantiates QDeclarativeGeoAddress
\inqmlmodule QtPositioning
\since 5.2
diff --git a/src/positioningquick/qdeclarativegeolocation.cpp b/src/positioningquick/qdeclarativegeolocation.cpp
index c06fcff2..3ad8854a 100644
--- a/src/positioningquick/qdeclarativegeolocation.cpp
+++ b/src/positioningquick/qdeclarativegeolocation.cpp
@@ -43,7 +43,6 @@ QT_USE_NAMESPACE
/*!
\qmltype Location
- \instantiates QDeclarativeGeoLocation
\inqmlmodule QtPositioning
\since 5.2
diff --git a/src/positioningquick/qdeclarativepositionsource_p.h b/src/positioningquick/qdeclarativepositionsource_p.h
index da6f8305..0c1d8944 100644
--- a/src/positioningquick/qdeclarativepositionsource_p.h
+++ b/src/positioningquick/qdeclarativepositionsource_p.h
@@ -131,8 +131,8 @@ public:
void classBegin() { }
void componentComplete();
- Q_INVOKABLE bool setBackendProperty(const QString &name, const QVariant &value);
- Q_INVOKABLE QVariant backendProperty(const QString &name) const;
+ Q_REVISION(14) Q_INVOKABLE bool setBackendProperty(const QString &name, const QVariant &value);
+ Q_REVISION(14) Q_INVOKABLE QVariant backendProperty(const QString &name) const;
public Q_SLOTS:
void update(); // TODO Qt 6 change to void update(int)
diff --git a/src/positioningquick/qquickgeocoordinateanimation.cpp b/src/positioningquick/qquickgeocoordinateanimation.cpp
index b00f187d..df467dd0 100644
--- a/src/positioningquick/qquickgeocoordinateanimation.cpp
+++ b/src/positioningquick/qquickgeocoordinateanimation.cpp
@@ -48,7 +48,6 @@ QT_BEGIN_NAMESPACE
/*!
\qmltype CoordinateAnimation
- \instantiates QQuickGeoCoordinateAnimation
\inherits PropertyAnimation
\inqmlmodule QtPositioning
\since 5.3