summaryrefslogtreecommitdiff
path: root/src/imports/location/location.cpp
diff options
context:
space:
mode:
authorabcd <amos.choy@nokia.com>2012-08-17 13:56:48 +1000
committerQt by Nokia <qt-info@nokia.com>2012-08-24 07:25:02 +0200
commit35d0cea56da57aae312a5e0b92d7e9ab243dbffa (patch)
tree4280063b86c6c77621e6c9770dcaaf2042ce2f17 /src/imports/location/location.cpp
parent72dd61d45aa05512d66eb154df150cb20b35ba8f (diff)
downloadqtlocation-35d0cea56da57aae312a5e0b92d7e9ab243dbffa.tar.gz
Document and enforce that ExtendedAttributes are not instantiable
ExtendedAttributes are read-only properties of Places and so cannot be created or reassigned, but they can be modified. Explictly mention this in the documentation and register ExtendedAttributes as an uncreatable type. Change-Id: Ib48d4365a5232e7a11518720e2f04b039f92d40d Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/imports/location/location.cpp')
-rw-r--r--src/imports/location/location.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/imports/location/location.cpp b/src/imports/location/location.cpp
index af93204a..8c510200 100644
--- a/src/imports/location/location.cpp
+++ b/src/imports/location/location.cpp
@@ -182,6 +182,9 @@ public:
qmlRegisterType<QDeclarativeSearchResultModel>(uri, 5, 0, "PlaceSearchModel");
qmlRegisterType<QDeclarativeSearchSuggestionModel>(uri, 5, 0, "PlaceSearchSuggestionModel");
qmlRegisterType<QDeclarativePlaceAttribute>(uri, 5,0, "PlaceAttribute");
+ qmlRegisterUncreatableType<QQmlPropertyMap>(uri, 5, 0, "ExtendedAttributes", "ExtendedAttributes instances cannot be instantiated. "
+ "Only Place types have ExtendedAttributes and they cannot be re-assigned "
+ "(but can be modified).");
qmlRegisterType<QDeclarativeContactDetail>(uri, 5, 0, "ContactDetail");
qRegisterMetaType<QGeoCoordinate>("QGeoCoordinate");