diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-03-20 17:11:04 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-03-22 13:31:37 +0000 |
commit | 5efc22f0ac23f8894908a7e701a86771909c2efd (patch) | |
tree | 6de933f762a7372fec41205266bc2bd6a6e8c958 | |
parent | ce22c4ce062b7b656353dd857bb62dfb33b0de3c (diff) | |
download | qtlocation-5efc22f0ac23f8894908a7e701a86771909c2efd.tar.gz |
Deprecate MapParameter, introduce DynamicParameter
Same thing, different name, more suitable for being used outside a
Map element (e.g., inside MapObjects, MapItems, or Navigator).
Change-Id: I79839ef42daad0347a2b760d61d4124496c56fdd
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/imports/location/location.cpp | 1 | ||||
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomapparameter.cpp | 28 |
2 files changed, 19 insertions, 10 deletions
diff --git a/src/imports/location/location.cpp b/src/imports/location/location.cpp index d489d655..45b104b9 100644 --- a/src/imports/location/location.cpp +++ b/src/imports/location/location.cpp @@ -184,6 +184,7 @@ public: // Register the 5.11 types minor = 11; qmlRegisterType<QDeclarativeGeoWaypoint>(uri, major, minor, "Waypoint"); + qmlRegisterType<QDeclarativeGeoMapParameter>(uri, major, minor, "DynamicParameter"); // Register the latest Qt version as QML type version qmlRegisterModule(uri, QT_VERSION_MAJOR, QT_VERSION_MINOR); diff --git a/src/location/declarativemaps/qdeclarativegeomapparameter.cpp b/src/location/declarativemaps/qdeclarativegeomapparameter.cpp index a0e05436..0ee29f4e 100644 --- a/src/location/declarativemaps/qdeclarativegeomapparameter.cpp +++ b/src/location/declarativemaps/qdeclarativegeomapparameter.cpp @@ -45,32 +45,40 @@ QT_BEGIN_NAMESPACE /*! \qmltype MapParameter - \instantiates QDeclarativeGeoMapParameter \inqmlmodule QtLocation \ingroup qml-QtLocation5-maps \since Qt Location 5.9 + \deprecated + + Use \l DynamicParameter instead. +*/ - \brief The MapParameter type represents a parameter for a Map element. +/*! + \qmltype DynamicParameter + \instantiates QDeclarativeGeoMapParameter + \inqmlmodule QtLocation + \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. - MapParameters by default contain only the \l type property, and + DynamicParameters by default contain only the \l type property, and are highly plugin-dependent. For this reason, additional properties have to be defined inside a - MapParameter at declaration time, using the QML syntax "property var foo". + DynamicParameter at declaration time, using the QML syntax "property var foo". - What properties have to be put inside a particular MapParameter type for + 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 MapProperties are \b optional. + Note that DynamicParameters are \b optional. By not specifying any of them, the Map will have the default behavior. - - The release of this API with Qt 5.9 is a Technology Preview. */ /*! - \qmlproperty string QtLocation::MapParameter::type + \qmlproperty string QtLocation::DynamicParameter::type - Set-once property which holds a string defining the type of the MapParameter + Set-once property which holds a string defining the type of the DynamicParameter */ QDeclarativeGeoMapParameter::QDeclarativeGeoMapParameter(QObject *parent) |