summaryrefslogtreecommitdiffstats
path: root/src/imports/location/qdeclarativegeocodemodel.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-08-29 11:27:50 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-03 09:06:50 +0200
commitfc53ebdbd043642aaab0ce39f48d7c05231d10fd (patch)
treeedb5635f9fb1c9252f31434452e05e75d7b9bcb7 /src/imports/location/qdeclarativegeocodemodel.cpp
parent9f98392aff316bff0b89ac20234234e1e3f060e2 (diff)
Fix some name inconsistencies in QtLocation
1. Rename QGeocoding* classes to QGeoCoding*. This emphasizes the QGeo prefix rather than the geocing word. The QML interfaces continues to use the Geocoding* as they don't a prefix as such. 2. Rename QProposedSearchResult to QPlaceProposedSearchResult. The class is place related and should carry the QPlace name prefix Change-Id: I428c7e6368774a9f199db5c113de11649e4a665c Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Diffstat (limited to 'src/imports/location/qdeclarativegeocodemodel.cpp')
-rw-r--r--src/imports/location/qdeclarativegeocodemodel.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/imports/location/qdeclarativegeocodemodel.cpp b/src/imports/location/qdeclarativegeocodemodel.cpp
index d242ec75..e169e5a6 100644
--- a/src/imports/location/qdeclarativegeocodemodel.cpp
+++ b/src/imports/location/qdeclarativegeocodemodel.cpp
@@ -44,7 +44,7 @@
#include <QtQml/qqmlinfo.h>
#include <QtLocation/QGeoServiceProvider>
-#include <QtLocation/QGeocodingManager>
+#include <QtLocation/QGeoCodingManager>
#include <QtPositioning/QGeoCircle>
QT_BEGIN_NAMESPACE
@@ -153,7 +153,7 @@ void QDeclarativeGeocodeModel::update()
if (!serviceProvider)
return;
- QGeocodingManager *geocodingManager = serviceProvider->geocodingManager();
+ QGeoCodingManager *geocodingManager = serviceProvider->geocodingManager();
if (!geocodingManager) {
qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, GEOCODE_MGR_NOT_SET);
return;
@@ -171,7 +171,7 @@ void QDeclarativeGeocodeModel::update()
setStatus(QDeclarativeGeocodeModel::Loading);
reply_ = geocodingManager->reverseGeocode(coordinate_, boundingArea_);
if (reply_->isFinished()) {
- if (reply_->error() == QGeocodeReply::NoError) {
+ if (reply_->error() == QGeoCodeReply::NoError) {
geocodeFinished(reply_);
} else {
geocodeError(reply_, reply_->error(), reply_->errorString());
@@ -181,7 +181,7 @@ void QDeclarativeGeocodeModel::update()
setStatus(QDeclarativeGeocodeModel::Loading);
reply_ = geocodingManager->geocode(address_->address(), boundingArea_);
if (reply_->isFinished()) {
- if (reply_->error() == QGeocodeReply::NoError) {
+ if (reply_->error() == QGeoCodeReply::NoError) {
geocodeFinished(reply_);
} else {
geocodeError(reply_, reply_->error(), reply_->errorString());
@@ -191,7 +191,7 @@ void QDeclarativeGeocodeModel::update()
setStatus(QDeclarativeGeocodeModel::Loading);
reply_ = geocodingManager->geocode(searchString_, limit_, offset_, boundingArea_);
if (reply_->isFinished()) {
- if (reply_->error() == QGeocodeReply::NoError) {
+ if (reply_->error() == QGeoCodeReply::NoError) {
geocodeFinished(reply_);
} else {
geocodeError(reply_, reply_->error(), reply_->errorString());
@@ -285,15 +285,15 @@ void QDeclarativeGeocodeModel::setPlugin(QDeclarativeGeoServiceProvider *plugin)
void QDeclarativeGeocodeModel::pluginReady()
{
QGeoServiceProvider *serviceProvider = plugin_->sharedGeoServiceProvider();
- QGeocodingManager *geocodingManager = serviceProvider->geocodingManager();
+ QGeoCodingManager *geocodingManager = serviceProvider->geocodingManager();
if (!geocodingManager || serviceProvider->error() != QGeoServiceProvider::NoError) {
qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, PLUGIN_DOESNOT_SUPPORT_GEOCODING).arg(serviceProvider->errorString());
return;
}
- connect(geocodingManager, SIGNAL(finished(QGeocodeReply*)),
- this, SLOT(geocodeFinished(QGeocodeReply*)));
- connect(geocodingManager, SIGNAL(error(QGeocodeReply*,QGeocodeReply::Error,QString)),
- this, SLOT(geocodeError(QGeocodeReply*,QGeocodeReply::Error,QString)));
+ connect(geocodingManager, SIGNAL(finished(QGeoCodeReply*)),
+ this, SLOT(geocodeFinished(QGeoCodeReply*)));
+ connect(geocodingManager, SIGNAL(error(QGeoCodeReply*,QGeoCodeReply::Error,QString)),
+ this, SLOT(geocodeError(QGeoCodeReply*,QGeoCodeReply::Error,QString)));
}
/*!
@@ -350,9 +350,9 @@ QVariant QDeclarativeGeocodeModel::bounds() const
return QVariant::fromValue(boundingArea_);
}
-void QDeclarativeGeocodeModel::geocodeFinished(QGeocodeReply *reply)
+void QDeclarativeGeocodeModel::geocodeFinished(QGeoCodeReply *reply)
{
- if (reply != reply_ || reply->error() != QGeocodeReply::NoError)
+ if (reply != reply_ || reply->error() != QGeoCodeReply::NoError)
return;
int oldCount = declarativeLocations_.count();
setLocations(reply->locations());
@@ -369,8 +369,8 @@ void QDeclarativeGeocodeModel::geocodeFinished(QGeocodeReply *reply)
/*!
\internal
*/
-void QDeclarativeGeocodeModel::geocodeError(QGeocodeReply *reply,
- QGeocodeReply::Error error,
+void QDeclarativeGeocodeModel::geocodeError(QGeoCodeReply *reply,
+ QGeoCodeReply::Error error,
const QString &errorString)
{
if (reply != reply_)