summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-01 12:20:11 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-01 12:20:11 +0100
commitd47ce931797cde751a7df9802acc9917e54ff694 (patch)
tree2ebc7b52b4de95811283edb91831d25df67692a1
parent3e7b02e1501599fb69a7c79e44bd59365679d0e9 (diff)
parentc1dd5c2979e1558427536fe2435ff3892afe3e6f (diff)
downloadqtlocation-d47ce931797cde751a7df9802acc9917e54ff694.tar.gz
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts: .qmake.conf Change-Id: I21ae20734645fc34b302409163f7400015d8302c
-rw-r--r--dist/changes-5.13.220
-rw-r--r--src/location/declarativemaps/qdeclarativegeomap.cpp39
-rw-r--r--src/location/declarativemaps/qdeclarativegeomapitembase.cpp13
-rw-r--r--src/location/declarativemaps/qdeclarativegeomapparameter.cpp14
-rw-r--r--src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp2
-rw-r--r--src/plugins/geoservices/osm/qplacesearchreplyosm.cpp2
-rw-r--r--tests/auto/declarative_core/BLACKLIST6
7 files changed, 68 insertions, 28 deletions
diff --git a/dist/changes-5.13.2 b/dist/changes-5.13.2
new file mode 100644
index 00000000..e3bb833f
--- /dev/null
+++ b/dist/changes-5.13.2
@@ -0,0 +1,20 @@
+Qt 5.13.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.13.0 through 5.13.1.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+https://doc.qt.io/qt-5/index.html
+
+The Qt version 5.13 series is binary compatible with the 5.12.x series.
+Applications compiled for 5.12 will continue to run with 5.13.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+ - This release contains only minor code improvements.
diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp
index 9a46875e..7cc7a0fa 100644
--- a/src/location/declarativemaps/qdeclarativegeomap.cpp
+++ b/src/location/declarativemaps/qdeclarativegeomap.cpp
@@ -623,6 +623,15 @@ void QDeclarativeGeoMap::mappingManagerInitialized()
if (!m_map)
return;
+ // Any map items that were added before the plugin was ready
+ // need to have setMap called again
+ for (const QPointer<QDeclarativeGeoMapItemBase> &item : qAsConst(m_mapItems)) {
+ if (item) {
+ item->setMap(this, m_map);
+ m_map->addMapItem(item.data()); // m_map filters out what is not supported.
+ }
+ }
+
/* COPY NOTICE SETUP */
m_copyrights = new QDeclarativeGeoMapCopyrightNotice(this);
m_copyrights->setCopyrightsZ(m_maxChildZ + 1);
@@ -706,15 +715,6 @@ void QDeclarativeGeoMap::mappingManagerInitialized()
emit supportedMapTypesChanged();
emit activeMapTypeChanged();
- // Any map items that were added before the plugin was ready
- // need to have setMap called again
- for (const QPointer<QDeclarativeGeoMapItemBase> &item : qAsConst(m_mapItems)) {
- if (item) {
- item->setMap(this, m_map);
- m_map->addMapItem(item.data()); // m_map filters out what is not supported.
- }
- }
-
// Any map item groups that were added before the plugin was ready
// DO NOT need to have setMap called again on their children map items
// because they have been added to m_mapItems, which is processed right above.
@@ -1436,6 +1436,14 @@ void QDeclarativeGeoMap::setVisibleArea(const QRectF &visibleArea)
if (m_initialized) {
m_map->setVisibleArea(visibleArea);
+ const QRectF newVisibleArea = QDeclarativeGeoMap::visibleArea();
+ if (newVisibleArea != oldVisibleArea) {
+ // polish map items
+ for (const QPointer<QDeclarativeGeoMapItemBase> &i: qAsConst(m_mapItems)) {
+ if (i)
+ i->visibleAreaChanged();
+ }
+ }
} else {
m_visibleArea = visibleArea;
const QRectF newVisibleArea = QDeclarativeGeoMap::visibleArea();
@@ -1757,6 +1765,11 @@ void QDeclarativeGeoMap::onCameraDataChanged(const QGeoCameraData &cameraData)
bool zoomHasChanged = cameraData.zoomLevel() != m_cameraData.zoomLevel();
m_cameraData = cameraData;
+ // polish map items
+ for (const QPointer<QDeclarativeGeoMapItemBase> &i: qAsConst(m_mapItems)) {
+ if (i)
+ i->baseCameraDataChanged(m_cameraData); // Consider optimizing this further, removing the contained duplicate if conditions.
+ }
if (centerHasChanged)
emit centerChanged(m_cameraData.center());
@@ -2241,7 +2254,13 @@ void QDeclarativeGeoMap::geometryChanged(const QRectF &newGeometry, const QRectF
QGeoCoordinate coord = cameraData.center();
coord.setLatitude(qBound(m_minimumViewportLatitude, coord.latitude(), m_maximumViewportLatitude));
cameraData.setCenter(coord);
- m_map->setCameraData(cameraData);
+ m_map->setCameraData(cameraData); // this polishes map items
+ } else if (oldGeometry.size() != newGeometry.size()) {
+ // polish map items
+ for (const QPointer<QDeclarativeGeoMapItemBase> &i: qAsConst(m_mapItems)) {
+ if (i)
+ i->polishAndUpdate();
+ }
}
}
diff --git a/src/location/declarativemaps/qdeclarativegeomapitembase.cpp b/src/location/declarativemaps/qdeclarativegeomapitembase.cpp
index 9a2ae50b..23993faf 100644
--- a/src/location/declarativemaps/qdeclarativegeomapitembase.cpp
+++ b/src/location/declarativemaps/qdeclarativegeomapitembase.cpp
@@ -126,21 +126,14 @@ void QDeclarativeGeoMapItemBase::setMap(QDeclarativeGeoMap *quickMap, QGeoMap *m
return;
if (quickMap && quickMap_)
return; // don't allow association to more than one map
- if (quickMap_)
- quickMap_->disconnect(this);
- if (map_)
- map_->disconnect(this);
quickMap_ = quickMap;
map_ = map;
if (map_ && quickMap_) {
- connect(map_, SIGNAL(cameraDataChanged(QGeoCameraData)),
- this, SLOT(baseCameraDataChanged(QGeoCameraData)));
- connect(map_, SIGNAL(visibleAreaChanged()),
- this, SLOT(visibleAreaChanged()));
- connect(quickMap, SIGNAL(heightChanged()), this, SLOT(polishAndUpdate()));
- connect(quickMap, SIGNAL(widthChanged()), this, SLOT(polishAndUpdate()));
+ // For performance reasons we're not connecting map_'s and quickMap_'s signals to this.
+ // Rather, the handling of cameraDataChanged, visibleAreaChanged, heightChanged and widthChanged is done explicitly in QDeclarativeGeoMap by directly calling methods on the items.
+ // See QTBUG-76950
lastSize_ = QSizeF(quickMap_->width(), quickMap_->height());
lastCameraData_ = map_->cameraData();
}
diff --git a/src/location/declarativemaps/qdeclarativegeomapparameter.cpp b/src/location/declarativemaps/qdeclarativegeomapparameter.cpp
index 2408e1c7..77a78aee 100644
--- a/src/location/declarativemaps/qdeclarativegeomapparameter.cpp
+++ b/src/location/declarativemaps/qdeclarativegeomapparameter.cpp
@@ -68,7 +68,7 @@ Q_SIGNALS:
\since QtLocation 5.9
\deprecated
- Use \l DynamicParameter instead.
+ This type is deprecated and has been remamed into \l DynamicParameter.
*/
/*!
@@ -78,9 +78,11 @@ Q_SIGNALS:
\ingroup qml-QtLocation5-maps
\since Qt Location 5.11
- \brief The DynamicParameter type represents a parameter for a Map element.
- This type provides a mean to specify plugin-dependent optional parameters
- for a map.
+ \brief The DynamicParameter (previously \l MapParameter ) type represents a parameter for a Map element,
+ or other elements used in a Map (such as map items, etc.).
+ This type provides a mean to specify plugin-dependent optional dynamic parameters that allow a plugin to
+ extend the runtime API of the module.
+
DynamicParameters by default contain only the \l type property, and
are highly plugin-dependent.
@@ -89,8 +91,8 @@ Q_SIGNALS:
What properties have to be put inside a particular DynamicParameter type for
a particular plugin can be found in the documentation of the plugin.
- Note that DynamicParameters are \b optional.
- By not specifying any of them, the Map will have the default behavior.
+ \note DynamicParameters are \b optional.
+ By not specifying any of them, the Map, or other container elements, will have the default behavior.
*/
/*!
diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
index b0967499..9c088f2f 100644
--- a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
+++ b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
@@ -234,7 +234,7 @@ void QGeoMapMapboxGLPrivate::addMapItem(QDeclarativeGeoMapItemBase *item)
QObject::connect(mapItem, &QQuickItem::visibleChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
QObject::connect(mapItem, &QDeclarativeGeoMapItemBase::mapItemOpacityChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
QObject::connect(mapItem, &QDeclarativePolygonMapItem::pathChanged, q, &QGeoMapMapboxGL::onMapItemGeometryChanged);
- QObject::connect(mapItem, &QDeclarativePolygonMapItem::colorChanged, q, &QGeoMapMapboxGL::onMapItemGeometryChanged);
+ QObject::connect(mapItem, &QDeclarativePolygonMapItem::colorChanged, q, &QGeoMapMapboxGL::onMapItemPropertyChanged);
QObject::connect(mapItem->border(), &QDeclarativeMapLineProperties::colorChanged, q, &QGeoMapMapboxGL::onMapItemSubPropertyChanged);
QObject::connect(mapItem->border(), &QDeclarativeMapLineProperties::widthChanged, q, &QGeoMapMapboxGL::onMapItemUnsupportedPropertyChanged);
} break;
diff --git a/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp b/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp
index d65b0735..366ff852 100644
--- a/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp
+++ b/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp
@@ -184,7 +184,7 @@ QPlaceResult QPlaceSearchReplyOsm::parsePlaceResult(const QJsonObject &item) con
//double importance = item.value(QStringLiteral("importance")).toDouble();
place.setAttribution(item.value(QStringLiteral("licence")).toString());
- place.setPlaceId(item.value(QStringLiteral("place_id")).toString());
+ place.setPlaceId(QString::number(item.value(QStringLiteral("place_id")).toInt()));
QVariantMap iconParameters;
iconParameters.insert(QPlaceIcon::SingleUrl,
diff --git a/tests/auto/declarative_core/BLACKLIST b/tests/auto/declarative_core/BLACKLIST
new file mode 100644
index 00000000..99b4d786
--- /dev/null
+++ b/tests/auto/declarative_core/BLACKLIST
@@ -0,0 +1,6 @@
+# QTBUG-59074 flaky test
+[CoordinateAnimation::test_west_direction_coordinate_animation]
+osx
+# QTBUG-59074 flaky test
+[CoordinateAnimation::test_east_direction_coordinate_animation]
+osx