diff options
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeocodemodel.cpp')
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeocodemodel.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeocodemodel.cpp b/src/location/declarativemaps/qdeclarativegeocodemodel.cpp index 43ce95a9..3e1cca30 100644 --- a/src/location/declarativemaps/qdeclarativegeocodemodel.cpp +++ b/src/location/declarativemaps/qdeclarativegeocodemodel.cpp @@ -42,6 +42,7 @@ #include <QtPositioning/QGeoCircle> #include <QtLocation/QGeoServiceProvider> #include <QtLocation/QGeoCodingManager> +#include <QtLocation/private/qgeocodereply_p.h> #include <QtPositioning/QGeoPolygon> QT_BEGIN_NAMESPACE @@ -232,7 +233,7 @@ void QDeclarativeGeocodeModel::queryContentChanged() */ int QDeclarativeGeocodeModel::rowCount(const QModelIndex &parent) const { - Q_UNUSED(parent) + Q_UNUSED(parent); return declarativeLocations_.count(); } @@ -292,9 +293,9 @@ void QDeclarativeGeocodeModel::pluginReady() QGeoServiceProvider *serviceProvider = plugin_->sharedGeoServiceProvider(); QGeoCodingManager *geocodingManager = serviceProvider->geocodingManager(); - if (serviceProvider->error() != QGeoServiceProvider::NoError) { + if (serviceProvider->geocodingError() != QGeoServiceProvider::NoError) { QDeclarativeGeocodeModel::GeocodeError newError = UnknownError; - switch (serviceProvider->error()) { + switch (serviceProvider->geocodingError()) { case QGeoServiceProvider::NotSupportedError: newError = EngineNotSetError; break; case QGeoServiceProvider::UnknownParameterError: @@ -307,7 +308,7 @@ void QDeclarativeGeocodeModel::pluginReady() break; } - setError(newError, serviceProvider->errorString()); + setError(newError, serviceProvider->geocodingErrorString()); return; } @@ -389,6 +390,7 @@ void QDeclarativeGeocodeModel::geocodeFinished(QGeoCodeReply *reply) reply->deleteLater(); reply_ = 0; int oldCount = declarativeLocations_.count(); + // const QVariantMap &extraData = QGeoCodeReplyPrivate::get(*reply)->extraData(); setLocations(reply->locations()); setError(NoError, QString()); setStatus(QDeclarativeGeocodeModel::Ready); |