diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-28 03:06:05 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-28 03:06:12 +0200 |
commit | c6db81a9cf852474bb020f3ea8534998deb599f7 (patch) | |
tree | 052c3278fb70161f9f9afdef652244729d56d81f | |
parent | cec9762f3c553a2870b32cfb3ba645bdcaaef671 (diff) | |
parent | b45ae3c02ebefc00ea58223f9cf1aa2727807882 (diff) |
Merge "Merge remote-tracking branch 'origin/5.15' into dev"
-rw-r--r-- | dist/changes-5.12.5 | 20 | ||||
-rw-r--r-- | dist/changes-5.13.1 | 20 | ||||
m--------- | src/3rdparty/mapbox-gl-native | 0 | ||||
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomap.cpp | 44 | ||||
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomap_p.h | 4 | ||||
-rw-r--r-- | src/positioning/qgeopositioninfosource.cpp | 4 | ||||
-rw-r--r-- | src/positioning/qgeopositioninfosource.h | 4 | ||||
-rw-r--r-- | src/positioning/qgeopositioninfosource_p.h | 2 | ||||
-rw-r--r-- | src/positioning/qgeopositioninfosourcefactory.cpp | 39 | ||||
-rw-r--r-- | src/positioning/qgeosatelliteinfosource.h | 2 | ||||
-rw-r--r-- | src/positioningquick/qdeclarativepositionsource.cpp | 2 | ||||
-rw-r--r-- | src/positioningquick/qdeclarativepositionsource_p.h | 2 | ||||
-rw-r--r-- | tests/auto/auto.pro | 23 | ||||
-rw-r--r-- | tests/auto/positionplugin/plugin.cpp | 2 |
14 files changed, 138 insertions, 30 deletions
diff --git a/dist/changes-5.12.5 b/dist/changes-5.12.5 new file mode 100644 index 00000000..e8be9316 --- /dev/null +++ b/dist/changes-5.12.5 @@ -0,0 +1,20 @@ +Qt 5.12.5 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.4. + +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.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +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/dist/changes-5.13.1 b/dist/changes-5.13.1 new file mode 100644 index 00000000..57ebdbeb --- /dev/null +++ b/dist/changes-5.13.1 @@ -0,0 +1,20 @@ +Qt 5.13.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.13.0. + +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/3rdparty/mapbox-gl-native b/src/3rdparty/mapbox-gl-native -Subproject 4b85252fbe811a786c6ee9eabedb7639b031dc5 +Subproject 5233c75b3f6c73623c5473b2d6573f31f3ddb4b diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp index 4704dc3e..4f7c3945 100644 --- a/src/location/declarativemaps/qdeclarativegeomap.cpp +++ b/src/location/declarativemaps/qdeclarativegeomap.cpp @@ -2261,17 +2261,31 @@ void QDeclarativeGeoMap::geometryChanged(const QRectF &newGeometry, const QRectF } /*! - \qmlmethod void QtLocation::Map::fitViewportToMapItems() + \qmlmethod void QtLocation::Map::fitViewportToMapItems(list<MapItems> items = {}) - Fits the current viewport to the boundary of all map items. The camera is positioned - in the center of the map items, and at the largest integral zoom level possible which - allows all map items to be visible on screen. + If no argument is provided, fits the current viewport to the boundary of all map items. + The camera is positioned in the center of the map items, and at the largest integral zoom level + possible which allows all map items to be visible on screen. + If \a items is provided, fits the current viewport to the boundary of the specified map items only. + + \note This method gained the optional \a items argument since Qt 5.15. + In previous releases, this method fitted the map to all map items. \sa fitViewportToVisibleMapItems */ -void QDeclarativeGeoMap::fitViewportToMapItems() +void QDeclarativeGeoMap::fitViewportToMapItems(const QVariantList &items) { - fitViewportToMapItemsRefine(true, false); + if (items.size()) { + QList<QPointer<QDeclarativeGeoMapItemBase> > itms; + for (const QVariant &i: items) { + QDeclarativeGeoMapItemBase *itm = qobject_cast<QDeclarativeGeoMapItemBase *>(i.value<QObject *>()); + if (itm) + itms.append(itm); + } + fitViewportToMapItemsRefine(itms, true, false); + } else { + fitViewportToMapItemsRefine(m_mapItems, true, false); + } } /*! @@ -2285,18 +2299,20 @@ void QDeclarativeGeoMap::fitViewportToMapItems() */ void QDeclarativeGeoMap::fitViewportToVisibleMapItems() { - fitViewportToMapItemsRefine(true, true); + fitViewportToMapItemsRefine(m_mapItems, true, true); } /*! \internal */ -void QDeclarativeGeoMap::fitViewportToMapItemsRefine(bool refine, bool onlyVisible) +void QDeclarativeGeoMap::fitViewportToMapItemsRefine(const QList<QPointer<QDeclarativeGeoMapItemBase> > &mapItems, + bool refine, + bool onlyVisible) { if (!m_map) return; - if (m_mapItems.size() == 0) + if (mapItems.size() == 0) return; double minX = qInf(); @@ -2311,10 +2327,10 @@ void QDeclarativeGeoMap::fitViewportToMapItemsRefine(bool refine, bool onlyVisib // find bounds of all map items int itemCount = 0; - for (int i = 0; i < m_mapItems.count(); ++i) { - if (!m_mapItems.at(i)) + for (int i = 0; i < mapItems.count(); ++i) { + if (!mapItems.at(i)) continue; - QDeclarativeGeoMapItemBase *item = m_mapItems.at(i).data(); + QDeclarativeGeoMapItemBase *item = mapItems.at(i).data(); if (!item || (onlyVisible && (!item->isVisible() || item->mapItemOpacity() <= 0.0))) continue; @@ -2365,7 +2381,7 @@ void QDeclarativeGeoMap::fitViewportToMapItemsRefine(bool refine, bool onlyVisib if (itemCount == 0) { if (haveQuickItem) - fitViewportToMapItemsRefine(false, onlyVisible); + fitViewportToMapItemsRefine(mapItems, false, onlyVisible); return; } double bboxWidth = maxX - minX; @@ -2395,7 +2411,7 @@ void QDeclarativeGeoMap::fitViewportToMapItemsRefine(bool refine, bool onlyVisib // as map quick items retain the same screen size after the camera zooms in/out // we refine the viewport again to achieve better results if (refine) - fitViewportToMapItemsRefine(false, onlyVisible); + fitViewportToMapItemsRefine(mapItems, false, onlyVisible); } /*! diff --git a/src/location/declarativemaps/qdeclarativegeomap_p.h b/src/location/declarativemaps/qdeclarativegeomap_p.h index c97c3622..ee9f8ec2 100644 --- a/src/location/declarativemaps/qdeclarativegeomap_p.h +++ b/src/location/declarativemaps/qdeclarativegeomap_p.h @@ -193,7 +193,7 @@ public: QQuickGeoMapGestureArea *gesture(); - Q_INVOKABLE void fitViewportToMapItems(); + Q_INVOKABLE void fitViewportToMapItems(const QVariantList &items = {}); Q_INVOKABLE void fitViewportToVisibleMapItems(); Q_INVOKABLE void pan(int dx, int dy); Q_INVOKABLE void prefetchData(); // optional hint for prefetch @@ -280,7 +280,7 @@ private: void setupMapView(QDeclarativeGeoMapItemView *view); void populateMap(); void populateParameters(); - void fitViewportToMapItemsRefine(bool refine, bool onlyVisible); + void fitViewportToMapItemsRefine(const QList<QPointer<QDeclarativeGeoMapItemBase> > &mapItems, bool refine, bool onlyVisible); bool isInteractive(); void attachCopyrightNotice(bool initialVisibility); void detachCopyrightNotice(bool currentVisibility); diff --git a/src/positioning/qgeopositioninfosource.cpp b/src/positioning/qgeopositioninfosource.cpp index 69fcdef0..4690f8a3 100644 --- a/src/positioning/qgeopositioninfosource.cpp +++ b/src/positioning/qgeopositioninfosource.cpp @@ -133,7 +133,7 @@ void QGeoPositionInfoSourcePrivate::loadPlugin() factory = factoryV2; } -bool QGeoPositionInfoSourcePrivate::setBackendProperty(const QString &/*name*/, QVariant /*value*/) +bool QGeoPositionInfoSourcePrivate::setBackendProperty(const QString &/*name*/, const QVariant & /*value*/) { return false; } @@ -241,7 +241,7 @@ QString QGeoPositionInfoSource::sourceName() const \sa backendProperty \since Qt 5.14 */ -bool QGeoPositionInfoSource::setBackendProperty(const QString &name, QVariant value) +bool QGeoPositionInfoSource::setBackendProperty(const QString &name, const QVariant &value) { return d->setBackendProperty(name, value); } diff --git a/src/positioning/qgeopositioninfosource.h b/src/positioning/qgeopositioninfosource.h index eaf5e106..15465bdf 100644 --- a/src/positioning/qgeopositioninfosource.h +++ b/src/positioning/qgeopositioninfosource.h @@ -87,7 +87,7 @@ public: QString sourceName() const; - bool setBackendProperty(const QString &name, QVariant value); + bool setBackendProperty(const QString &name, const QVariant &value); QVariant backendProperty(const QString &name) const; static QGeoPositionInfoSource *createDefaultSource(QObject *parent); @@ -110,7 +110,7 @@ Q_SIGNALS: void supportedPositioningMethodsChanged(); protected: - QGeoPositionInfoSource(QGeoPositionInfoSourcePrivate &dd, QObject *parent); + explicit QGeoPositionInfoSource(QGeoPositionInfoSourcePrivate &dd, QObject *parent); private: Q_DISABLE_COPY(QGeoPositionInfoSource) diff --git a/src/positioning/qgeopositioninfosource_p.h b/src/positioning/qgeopositioninfosource_p.h index ccd92a4e..2ae93055 100644 --- a/src/positioning/qgeopositioninfosource_p.h +++ b/src/positioning/qgeopositioninfosource_p.h @@ -76,7 +76,7 @@ public: void loadMeta(); void loadPlugin(); - virtual bool setBackendProperty(const QString &name, QVariant value); + virtual bool setBackendProperty(const QString &name, const QVariant &value); virtual QVariant backendProperty(const QString &name) const; static QHash<QString, QJsonObject> plugins(bool reload = false); diff --git a/src/positioning/qgeopositioninfosourcefactory.cpp b/src/positioning/qgeopositioninfosourcefactory.cpp index 76803566..afb0a1d3 100644 --- a/src/positioning/qgeopositioninfosourcefactory.cpp +++ b/src/positioning/qgeopositioninfosourcefactory.cpp @@ -84,6 +84,45 @@ QT_BEGIN_NAMESPACE QGeoPositionInfoSourceFactory::~QGeoPositionInfoSourceFactory() {} +/*! + \class QGeoPositionInfoSourceFactoryV2 + \inmodule QtPositioning + \since 5.14 + + \brief The QGeoPositionInfoSourceFactoryV2 class extends + QGeoPositionInfoSourceFactory, adding factory methods taking a parameters argument. + + This interface has the priority over the older one with plugins implementing it, + when creating a positioning source (position, satellite or area monitor) +*/ + +/*! + \fn QGeoPositionInfoSource *QGeoPositionInfoSourceFactoryV2::positionInfoSourceWithParameters(QObject *parent, const QVariantMap ¶meters) + + Returns a new QGeoPositionInfoSource associated with this plugin + with parent \a parent, and using \a parameters as configuration parameters. + Can also return 0, in which case the plugin loader will use the factory with + the next highest priority. + */ + +/*! + \fn QGeoSatelliteInfoSource *QGeoPositionInfoSourceFactoryV2::satelliteInfoSourceWithParameters(QObject *parent, const QVariantMap ¶meters) + + Returns a new QGeoSatelliteInfoSource associated with this plugin + with parent \a parent., and using \a parameters as configuration parameters. + Can also return 0, in which case the plugin loader will use the factory with + the next highest priority. + */ + +/*! + \fn QGeoAreaMonitorSource *QGeoPositionInfoSourceFactoryV2::areaMonitorWithParameters(QObject *parent, const QVariantMap ¶meters); + + Returns a new QGeoAreaMonitorSource associated with this plugin with parent + \a parent, and using \a parameters as configuration parameters. + Can also return 0, in which case the plugin loader will use the factory with + the next highest priority. + */ + QGeoPositionInfoSourceFactoryV2::~QGeoPositionInfoSourceFactoryV2() {} diff --git a/src/positioning/qgeosatelliteinfosource.h b/src/positioning/qgeosatelliteinfosource.h index 4f073864..e9c4fa19 100644 --- a/src/positioning/qgeosatelliteinfosource.h +++ b/src/positioning/qgeosatelliteinfosource.h @@ -91,7 +91,7 @@ Q_SIGNALS: void error(QGeoSatelliteInfoSource::Error); protected: - QGeoSatelliteInfoSource(QGeoSatelliteInfoSourcePrivate &dd, QObject *parent); + explicit QGeoSatelliteInfoSource(QGeoSatelliteInfoSourcePrivate &dd, QObject *parent); private: Q_DISABLE_COPY(QGeoSatelliteInfoSource) diff --git a/src/positioningquick/qdeclarativepositionsource.cpp b/src/positioningquick/qdeclarativepositionsource.cpp index cfbcc9da..6e042d9f 100644 --- a/src/positioningquick/qdeclarativepositionsource.cpp +++ b/src/positioningquick/qdeclarativepositionsource.cpp @@ -873,7 +873,7 @@ void QDeclarativePositionSource::componentComplete() \sa backendProperty, QGeoPositionInfoSource::setBackendProperty */ -bool QDeclarativePositionSource::setBackendProperty(const QString &name, QVariant value) +bool QDeclarativePositionSource::setBackendProperty(const QString &name, const QVariant &value) { if (m_positionSource) return m_positionSource->setBackendProperty(name, value); diff --git a/src/positioningquick/qdeclarativepositionsource_p.h b/src/positioningquick/qdeclarativepositionsource_p.h index dff0006c..da6f8305 100644 --- a/src/positioningquick/qdeclarativepositionsource_p.h +++ b/src/positioningquick/qdeclarativepositionsource_p.h @@ -131,7 +131,7 @@ public: void classBegin() { } void componentComplete(); - Q_INVOKABLE bool setBackendProperty(const QString &name, QVariant value); + Q_INVOKABLE bool setBackendProperty(const QString &name, const QVariant &value); Q_INVOKABLE QVariant backendProperty(const QString &name) const; public Q_SLOTS: diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 05559d12..2b04d110 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -2,6 +2,8 @@ TEMPLATE = subdirs qtHaveModule(location) { + SUBDIRS += geotestplugin # several subtargets depend on this + #Place unit tests SUBDIRS += qplace \ qplaceattribute \ @@ -25,19 +27,22 @@ qtHaveModule(location) { qplacesearchsuggestionreply \ qplaceuser - !android: SUBDIRS += \ + !android: { + SUBDIRS += \ qplacemanager \ qplacemanager_nokia \ qplacemanager_unsupported \ placesplugin_unsupported + qplacemanager.depends = geotestplugin + } + #misc tests SUBDIRS += doublevectors !android: SUBDIRS += cmake qmlinterface # looks for .qmls locally #Map and Navigation tests - SUBDIRS += geotestplugin \ - qgeocodingmanagerplugins \ + SUBDIRS += qgeocodingmanagerplugins \ qgeocameracapabilities\ qgeocameradata \ qgeocodereply \ @@ -54,17 +59,25 @@ qtHaveModule(location) { qgeocameratiles # These use plugins - !android: SUBDIRS += qgeoserviceprovider \ + !android: { + SUBDIRS += qgeoserviceprovider \ qgeoroutingmanager \ nokia_services \ qgeocodingmanager \ qgeotiledmap + qgeoserviceprovider.depends = geotestplugin + qgeotiledmap.depends = geotestplugin + } qtHaveModule(quick):!android { SUBDIRS += declarative_geoshape \ declarative_core + declarative_core.depends = geotestplugin - !mac: SUBDIRS += declarative_ui + !mac: { + SUBDIRS += declarative_ui + declarative_ui.depends = geotestplugin + } } } diff --git a/tests/auto/positionplugin/plugin.cpp b/tests/auto/positionplugin/plugin.cpp index 9d5c7dd5..f28797b5 100644 --- a/tests/auto/positionplugin/plugin.cpp +++ b/tests/auto/positionplugin/plugin.cpp @@ -69,7 +69,7 @@ private slots: class DummySourcePrivate : public QGeoPositionInfoSourcePrivate { public: - bool setBackendProperty(const QString &name, QVariant value) override + bool setBackendProperty(const QString &name, const QVariant &value) override { if (name == QStringLiteral("altitude")) { m_altitude = value.toReal(); |