diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-08-12 13:39:01 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-08-14 09:51:50 +0200 |
commit | f55ae20fa3216e0fcaa7973b047ac5688e2c50bc (patch) | |
tree | 55b9b84d9a3ef2d86aa3f92b4c1da7a16c6b3422 | |
parent | 05763575eb166a29073d1805a6fdd22a832cc0aa (diff) | |
download | qtlocation-f55ae20fa3216e0fcaa7973b047ac5688e2c50bc.tar.gz |
Fix revision and docs for new MapType::night property
This property was recently added but not properly advertised as Qt 5.4+
API element and the QML revision was not set.
Change-Id: Iab6a125269d627d5e1b3a0e457f6a42708ea7026
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
-rw-r--r-- | src/imports/location/location.cpp | 3 | ||||
-rw-r--r-- | src/imports/location/plugins.qmltypes | 9 | ||||
-rw-r--r-- | src/imports/location/qdeclarativegeomaptype.cpp | 1 | ||||
-rw-r--r-- | src/imports/location/qdeclarativegeomaptype_p.h | 2 |
4 files changed, 9 insertions, 6 deletions
diff --git a/src/imports/location/location.cpp b/src/imports/location/location.cpp index 1adc80ad..0a1ff40b 100644 --- a/src/imports/location/location.cpp +++ b/src/imports/location/location.cpp @@ -158,7 +158,8 @@ public: // Implicitly registers 5.3 minor = 4; // For now there are no new types; just reregister one existing 5.0 type - qmlRegisterType<QDeclarativeGeoServiceProvider >(uri, major, minor, "Plugin"); + qmlRegisterUncreatableType<QDeclarativeGeoMapType, 1>(uri, major, minor, "MapType", + QStringLiteral("MapType is not intended instantiable by developer.")); //registrations below are version independent qRegisterMetaType<QPlaceCategory>("QPlaceCategory"); diff --git a/src/imports/location/plugins.qmltypes b/src/imports/location/plugins.qmltypes index 64e8d145..d07df0f8 100644 --- a/src/imports/location/plugins.qmltypes +++ b/src/imports/location/plugins.qmltypes @@ -287,9 +287,9 @@ Module { Component { name: "QDeclarativeGeoMapType" prototype: "QObject" - exports: ["QtLocation/MapType 5.0"] + exports: ["QtLocation/MapType 5.0", "QtLocation/MapType 5.4"] isCreatable: false - exportMetaObjectRevisions: [0] + exportMetaObjectRevisions: [0, 1] Enum { name: "MapStyle" values: { @@ -310,6 +310,7 @@ Module { Property { name: "name"; type: "string"; isReadonly: true } Property { name: "description"; type: "string"; isReadonly: true } Property { name: "mobile"; type: "bool"; isReadonly: true } + Property { name: "night"; revision: 1; type: "bool"; isReadonly: true } } Component { name: "QDeclarativeGeoRoute" @@ -513,8 +514,8 @@ Module { name: "QDeclarativeGeoServiceProvider" defaultProperty: "parameters" prototype: "QObject" - exports: ["QtLocation/Plugin 5.0", "QtLocation/Plugin 5.4"] - exportMetaObjectRevisions: [0, 0] + exports: ["QtLocation/Plugin 5.0"] + exportMetaObjectRevisions: [0] Enum { name: "RoutingFeature" values: { diff --git a/src/imports/location/qdeclarativegeomaptype.cpp b/src/imports/location/qdeclarativegeomaptype.cpp index c5eb45c6..a6e6f4ee 100644 --- a/src/imports/location/qdeclarativegeomaptype.cpp +++ b/src/imports/location/qdeclarativegeomaptype.cpp @@ -124,6 +124,7 @@ bool QDeclarativeGeoMapType::mobile() const /*! \qmlproperty bool MapType::night + \since Qt Location 5.4 \brief Whether the map type is optimized for use at night. diff --git a/src/imports/location/qdeclarativegeomaptype_p.h b/src/imports/location/qdeclarativegeomaptype_p.h index d8e020dd..46326864 100644 --- a/src/imports/location/qdeclarativegeomaptype_p.h +++ b/src/imports/location/qdeclarativegeomaptype_p.h @@ -57,7 +57,7 @@ class QDeclarativeGeoMapType : public QObject Q_PROPERTY(QString name READ name CONSTANT) Q_PROPERTY(QString description READ description CONSTANT) Q_PROPERTY(bool mobile READ mobile CONSTANT) - Q_PROPERTY(bool night READ night CONSTANT) + Q_PROPERTY(bool night READ night CONSTANT REVISION 1) public: enum MapStyle { |