summaryrefslogtreecommitdiffstats
path: root/src/imports/location/qdeclarativegeocodemodel.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2012-05-01 15:40:52 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-09 00:44:19 +0200
commit6e63524d0c175fd1ef7c8ccfd047041622198fda (patch)
tree45294cc5f2b610e3c99a52b7e526c22dd723c8fa /src/imports/location/qdeclarativegeocodemodel.cpp
parent405ac7c7c4de6d26c2fd8a8f18e306d2526f3e55 (diff)
Add cancel() method to GeocodeModel and RouteModel.
Change-Id: If575f519425da01ad2052bd2d98e36453149d05c Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
Diffstat (limited to 'src/imports/location/qdeclarativegeocodemodel.cpp')
-rw-r--r--src/imports/location/qdeclarativegeocodemodel.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/imports/location/qdeclarativegeocodemodel.cpp b/src/imports/location/qdeclarativegeocodemodel.cpp
index 96771ac6..5e908ca5 100644
--- a/src/imports/location/qdeclarativegeocodemodel.cpp
+++ b/src/imports/location/qdeclarativegeocodemodel.cpp
@@ -604,6 +604,20 @@ void QDeclarativeGeocodeModel::reset()
}
/*!
+ \qmlmethod QtLocation5::GeocodeModel::cancel()
+
+ Cancels any outstanding requests and clears errors. Model status will be set to either
+ GeocodeModel.Null or GeocodeModel.Ready.
+*/
+void QDeclarativeGeocodeModel::cancel()
+{
+ abortRequest();
+ setErrorString(QString());
+ setError(NoError);
+ setStatus(declarativeLocations_.isEmpty() ? Null : Ready);
+}
+
+/*!
\qmlproperty QVariant QtLocation5::GeocodeModel::query
This property holds the data of the geocoding request.