summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2011-07-22 14:03:53 +1000
committerAaron McCarthy <aaron.mccarthy@nokia.com>2011-07-29 07:51:06 +0200
commit1d7195981caf1bf1d0bf0b0d1a047bc13b140d6f (patch)
tree5b06e91da400b7f0310db40454511951fca77679
parentf7131b42e6b997680ed4ebcc3d19becc1ef6da0e (diff)
downloadqtlocation-1d7195981caf1bf1d0bf0b0d1a047bc13b140d6f.tar.gz
Incorporate places/nokia plugin into geoservices/nokia plugin.
This brings the usage of the Places API inline with the rest of the functional groups in QtLocation. Removes the PlaceManager element. Change-Id: I6d7259fe7ea1e55dcf97b95025e0c78748e82b9f Reviewed-on: http://codereview.qt.nokia.com/2245 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
-rw-r--r--examples/declarative/qmlplaces/SearchResultDelegate.qml2
-rw-r--r--examples/declarative/qmlplaces/qmlplaces.qml12
-rw-r--r--src/imports/location/declarativeplaces/declarativeplaces.pri4
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativemediamodel.cpp64
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativemediamodel_p.h11
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplace.cpp141
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplace_p.h31
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplacemanager.cpp157
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplacemanager_p.h54
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp60
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativerecommendationmodel_p.h19
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp59
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativereviewmodel_p.h11
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesearchresult.cpp9
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp60
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h18
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp89
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel_p.h23
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativetextpredictionmodel.cpp66
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativetextpredictionmodel_p.h22
-rw-r--r--src/imports/location/location.cpp4
-rw-r--r--src/imports/location/qdeclarativegeoserviceprovider.cpp33
-rw-r--r--src/imports/location/qdeclarativegeoserviceprovider_p.h5
-rw-r--r--src/location/maps/qgeoserviceprovider.cpp53
-rw-r--r--src/location/maps/qgeoserviceprovider.h3
-rw-r--r--src/location/maps/qgeoserviceprovider_p.h3
-rw-r--r--src/location/maps/qgeoserviceproviderfactory.cpp25
-rw-r--r--src/location/maps/qgeoserviceproviderfactory.h3
-rw-r--r--src/location/places/places.pri3
-rw-r--r--src/location/places/qplacemanager.cpp20
-rw-r--r--src/location/places/qplacemanager.h9
-rw-r--r--src/location/places/qplacemanager_p.cpp39
-rw-r--r--src/location/places/qplacemanager_p.h5
-rw-r--r--src/location/places/qplacemanagerengine.cpp100
-rw-r--r--src/location/places/qplacemanagerengine.h17
-rw-r--r--src/location/places/qplacemanagerengine_p.h (renamed from src/plugins/places/nokia/placemanagerenginefactory_nokia.h)48
-rw-r--r--src/plugins/geoservices/nokia/nokia.pro2
-rw-r--r--src/plugins/geoservices/nokia/places/places.pri59
-rw-r--r--src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.cpp (renamed from src/plugins/places/nokia/qplacecategoriesreplyimpl.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.h (renamed from src/plugins/places/nokia/qplacecategoriesreplyimpl.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacecategoriesrepository.cpp (renamed from src/plugins/places/nokia/qplacecategoriesrepository.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacecategoriesrepository.h (renamed from src/plugins/places/nokia/qplacecategoriesrepository.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacedetailsreplyimpl.cpp (renamed from src/plugins/places/nokia/qplacedetailsreplyimpl.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacedetailsreplyimpl.h (renamed from src/plugins/places/nokia/qplacedetailsreplyimpl.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsoncategoriesparser.cpp (renamed from src/plugins/places/nokia/qplacejsoncategoriesparser.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsoncategoriesparser.h (renamed from src/plugins/places/nokia/qplacejsoncategoriesparser.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp (renamed from src/plugins/places/nokia/qplacejsondetailsparser.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsondetailsparser.h (renamed from src/plugins/places/nokia/qplacejsondetailsparser.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsonmediaparser.cpp (renamed from src/plugins/places/nokia/qplacejsonmediaparser.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsonmediaparser.h (renamed from src/plugins/places/nokia/qplacejsonmediaparser.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsonparser.cpp (renamed from src/plugins/places/nokia/qplacejsonparser.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsonparser_p.h (renamed from src/plugins/places/nokia/qplacejsonparser_p.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsonrecommendationparser.cpp (renamed from src/plugins/places/nokia/qplacejsonrecommendationparser.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsonrecommendationparser.h (renamed from src/plugins/places/nokia/qplacejsonrecommendationparser.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsonreviewparser.cpp (renamed from src/plugins/places/nokia/qplacejsonreviewparser.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsonreviewparser.h (renamed from src/plugins/places/nokia/qplacejsonreviewparser.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsonsearchparser.cpp (renamed from src/plugins/places/nokia/qplacejsonsearchparser.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsonsearchparser.h (renamed from src/plugins/places/nokia/qplacejsonsearchparser.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsontextpredictionparser.cpp (renamed from src/plugins/places/nokia/qplacejsontextpredictionparser.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsontextpredictionparser.h (renamed from src/plugins/places/nokia/qplacejsontextpredictionparser.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacemediareplyimpl.cpp (renamed from src/plugins/places/nokia/qplacemediareplyimpl.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacemediareplyimpl.h (renamed from src/plugins/places/nokia/qplacemediareplyimpl.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplaceratingreplyimpl.cpp (renamed from src/plugins/places/nokia/qplaceratingreplyimpl.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplaceratingreplyimpl.h (renamed from src/plugins/places/nokia/qplaceratingreplyimpl.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacerecommendationreplyimpl.cpp (renamed from src/plugins/places/nokia/qplacerecommendationreplyimpl.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacerecommendationreplyimpl.h (renamed from src/plugins/places/nokia/qplacerecommendationreplyimpl.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacerestmanager.cpp (renamed from src/plugins/places/nokia/qplacerestmanager.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacerestmanager.h (renamed from src/plugins/places/nokia/qplacerestmanager.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacerestreply.cpp (renamed from src/plugins/places/nokia/qplacerestreply.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacerestreply.h (renamed from src/plugins/places/nokia/qplacerestreply.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacereviewreplyimpl.cpp (renamed from src/plugins/places/nokia/qplacereviewreplyimpl.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacereviewreplyimpl.h (renamed from src/plugins/places/nokia/qplacereviewreplyimpl.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacesearchreplyimpl.cpp (renamed from src/plugins/places/nokia/qplacesearchreplyimpl.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacesearchreplyimpl.h (renamed from src/plugins/places/nokia/qplacesearchreplyimpl.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacesuppliersrepository.cpp (renamed from src/plugins/places/nokia/qplacesuppliersrepository.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacesuppliersrepository.h (renamed from src/plugins/places/nokia/qplacesuppliersrepository.h)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacetextpredictionreplyimpl.cpp (renamed from src/plugins/places/nokia/qplacetextpredictionreplyimpl.cpp)0
-rw-r--r--src/plugins/geoservices/nokia/places/qplacetextpredictionreplyimpl.h (renamed from src/plugins/places/nokia/qplacetextpredictionreplyimpl.h)0
-rw-r--r--src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp8
-rw-r--r--src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.h3
-rw-r--r--src/plugins/geoservices/nokia/qplacemanagerengine_nokia.cpp (renamed from src/plugins/places/nokia/qplacemanagerengineimpl.cpp)78
-rw-r--r--src/plugins/geoservices/nokia/qplacemanagerengine_nokia.h (renamed from src/plugins/places/nokia/qplacemanagerengineimpl.h)17
-rw-r--r--src/plugins/places/nokia/OVI_SERVICES_TERMS_AND_CONDITIONS.txt315
-rw-r--r--src/plugins/places/nokia/nokia.pro91
-rw-r--r--src/plugins/places/nokia/placemanagerenginefactory_nokia.cpp69
-rw-r--r--src/plugins/places/places.pro3
-rw-r--r--src/plugins/plugins.pro3
87 files changed, 1020 insertions, 910 deletions
diff --git a/examples/declarative/qmlplaces/SearchResultDelegate.qml b/examples/declarative/qmlplaces/SearchResultDelegate.qml
index 0ddd98f8..94a39aa8 100644
--- a/examples/declarative/qmlplaces/SearchResultDelegate.qml
+++ b/examples/declarative/qmlplaces/SearchResultDelegate.qml
@@ -91,7 +91,7 @@ Rectangle {
if (textFields.item.state == 'place-core') {
textFields.item.state = 'place-details'
if (!result.place.detailsFetched)
- placeManager.getPlaceDetails(result.place)
+ result.place.getDetails()
} else if (textFields.item.state == 'place-details') {
textFields.item.state = 'place-core'
}
diff --git a/examples/declarative/qmlplaces/qmlplaces.qml b/examples/declarative/qmlplaces/qmlplaces.qml
index 7e70975b..b5a90290 100644
--- a/examples/declarative/qmlplaces/qmlplaces.qml
+++ b/examples/declarative/qmlplaces/qmlplaces.qml
@@ -153,12 +153,15 @@ Rectangle {
}
}
- PlaceManager {
- id: placeManager
+ Plugin {
+ id: geoServices
+ name: "nokia"
}
SearchResultModel {
id: resultModel
+ plugin: geoServices
+
searchArea: BoundingCircle {
id: proximity
center: Coordinate {
@@ -193,6 +196,8 @@ Rectangle {
TextPredictionModel {
id: resultSuggestion
+ plugin: geoServices
+
searchArea: proximity
offset: 0
limit: 15
@@ -201,6 +206,8 @@ Rectangle {
RecommendationModel {
id: recommendationModel
+ plugin: geoServices
+
searchArea: proximity
offset: 0
limit: 15
@@ -209,5 +216,6 @@ Rectangle {
SupportedCategoriesModel {
id: categoriesModel
+ plugin: geoServices
}
}
diff --git a/src/imports/location/declarativeplaces/declarativeplaces.pri b/src/imports/location/declarativeplaces/declarativeplaces.pri
index fa110f0d..557165bd 100644
--- a/src/imports/location/declarativeplaces/declarativeplaces.pri
+++ b/src/imports/location/declarativeplaces/declarativeplaces.pri
@@ -1,6 +1,5 @@
INCLUDEPATH += declarativeplaces
SOURCES += \
- declarativeplaces/qdeclarativeplacemanager.cpp \
#models
declarativeplaces/qdeclarativerecommendationmodel.cpp \
declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp \
@@ -24,7 +23,6 @@ SOURCES += \
declarativeplaces/qdeclarativeweekdayhours.cpp
HEADERS += \
- declarativeplaces/qdeclarativeplacemanager_p.h \
#models
declarativeplaces/qdeclarativerecommendationmodel_p.h \
declarativeplaces/qdeclarativesupportedcategoriesmodel_p.h \
@@ -48,3 +46,5 @@ HEADERS += \
declarativeplaces/qdeclarativeweekdayhours_p.h
+
+
diff --git a/src/imports/location/declarativeplaces/qdeclarativemediamodel.cpp b/src/imports/location/declarativeplaces/qdeclarativemediamodel.cpp
index 93126cf4..d66daea2 100644
--- a/src/imports/location/declarativeplaces/qdeclarativemediamodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativemediamodel.cpp
@@ -1,5 +1,9 @@
#include "qdeclarativemediamodel_p.h"
-#include <qdeclarativeplace_p.h>
+#include "qdeclarativegeoserviceprovider_p.h"
+#include "qdeclarativeplace_p.h"
+
+#include <QtDeclarative/QDeclarativeInfo>
+#include <QtLocation/QGeoServiceProvider>
QT_USE_NAMESPACE
@@ -20,8 +24,8 @@ QT_USE_NAMESPACE
*/
QDeclarativeMediaModel::QDeclarativeMediaModel(QObject* parent)
-: QAbstractListModel(parent), m_place(0), m_batchSize(1), m_mediaCount(-1),
- m_manager(new QPlaceManager(this)), m_reply(0)
+: QAbstractListModel(parent), m_place(0), m_batchSize(1), m_mediaCount(-1), m_reply(0),
+ m_plugin(0), m_complete(false)
{
QHash<int, QByteArray> roleNames;
roleNames.insert(MediaRole, "media");
@@ -34,6 +38,33 @@ QDeclarativeMediaModel::~QDeclarativeMediaModel()
}
/*!
+ \qmlproperty Plugin MediaModel::plugin
+
+ This property holds the provider Plugin used by this model.
+*/
+void QDeclarativeMediaModel::setPlugin(QDeclarativeGeoServiceProvider *plugin)
+{
+ if (m_plugin == plugin)
+ return;
+
+ reset(); // reset the model
+ m_plugin = plugin;
+ if (m_complete)
+ emit pluginChanged();
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager || serviceProvider->error() != QGeoServiceProvider::NoError) {
+ qmlInfo(this) << tr("Warning: Plugin does not support places.");
+ return;
+ }
+}
+
+QDeclarativeGeoServiceProvider* QDeclarativeMediaModel::plugin() const
+{
+ return m_plugin;
+}
+
+/*!
\qmlproperty Place MediaModel::place
This property holds the Place that the media items are for.
@@ -53,10 +84,15 @@ void QDeclarativeMediaModel::setPlace(QDeclarativePlace *place)
m_reply = 0;
}
qDeleteAll(m_mediaObjects);
+ m_mediaObjects.clear();
endResetModel();
- m_mediaCount = -1;
- emit totalCountChanged();
+ if (m_mediaCount != -1) {
+ m_mediaCount = -1;
+ emit totalCountChanged();
+ }
+
+ setPlugin(place->plugin());
m_place = place;
emit placeChanged();
@@ -135,6 +171,21 @@ void QDeclarativeMediaModel::fetchMore(const QModelIndex &parent)
if (m_reply)
return;
+ if (!m_plugin) {
+ qmlInfo(this) << tr("plugin not set.");
+ return;
+ }
+
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ if (!serviceProvider)
+ return;
+
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager) {
+ qmlInfo(this) << tr("Places not supported by %1 Plugin.").arg(m_plugin->name());
+ return;
+ }
+
QPlaceQuery query;
if (m_mediaCount == -1) {
@@ -149,7 +200,7 @@ void QDeclarativeMediaModel::fetchMore(const QModelIndex &parent)
query.setLimit(qMin(m_batchSize, missing.second - missing.first + 1));
}
- m_reply = m_manager->getMedia(m_place->place(), query);
+ m_reply = placeManager->getMedia(m_place->place(), query);
connect(m_reply, SIGNAL(finished()), this, SLOT(fetchFinished()), Qt::QueuedConnection);
}
@@ -170,6 +221,7 @@ void QDeclarativeMediaModel::classBegin()
void QDeclarativeMediaModel::componentComplete()
{
+ m_complete = true;
fetchMore(QModelIndex());
}
diff --git a/src/imports/location/declarativeplaces/qdeclarativemediamodel_p.h b/src/imports/location/declarativeplaces/qdeclarativemediamodel_p.h
index 1dc73c8a..83641070 100644
--- a/src/imports/location/declarativeplaces/qdeclarativemediamodel_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativemediamodel_p.h
@@ -9,6 +9,8 @@
QT_BEGIN_NAMESPACE
class QDeclarativePlace;
+class QDeclarativeGeoServiceProvider;
+class QGeoServiceProvider;
class QDeclarativeMediaModel : public QAbstractListModel, public QDeclarativeParserStatus
{
@@ -16,6 +18,7 @@ class QDeclarativeMediaModel : public QAbstractListModel, public QDeclarativePar
Q_INTERFACES(QDeclarativeParserStatus)
+ Q_PROPERTY(QDeclarativeGeoServiceProvider *plugin READ plugin WRITE setPlugin NOTIFY pluginChanged)
Q_PROPERTY(QDeclarativePlace *place READ place WRITE setPlace NOTIFY placeChanged)
Q_PROPERTY(int batchSize READ batchSize WRITE setBatchSize NOTIFY batchSizeChanged)
Q_PROPERTY(int totalCount READ totalCount NOTIFY totalCountChanged)
@@ -24,6 +27,9 @@ public:
explicit QDeclarativeMediaModel(QObject* parent = 0);
~QDeclarativeMediaModel();
+ void setPlugin(QDeclarativeGeoServiceProvider *plugin);
+ QDeclarativeGeoServiceProvider* plugin() const;
+
QDeclarativePlace *place() const;
void setPlace(QDeclarativePlace *place);
@@ -47,6 +53,7 @@ public:
void componentComplete();
signals:
+ void pluginChanged();
void placeChanged();
void batchSizeChanged();
void totalCountChanged();
@@ -59,8 +66,10 @@ private:
int m_batchSize;
int m_mediaCount;
QMap<int, QDeclarativeMediaObject *> m_mediaObjects;
- QPlaceManager *m_manager;
QPlaceMediaReply *m_reply;
+
+ QDeclarativeGeoServiceProvider *m_plugin;
+ bool m_complete;
};
QT_END_NAMESPACE
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
index 57d513ed..22d4a894 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
@@ -1,4 +1,8 @@
#include "qdeclarativeplace_p.h"
+#include "qdeclarativegeoserviceprovider_p.h"
+
+#include <QtDeclarative/QDeclarativeInfo>
+#include <QtLocation/QGeoServiceProvider>
QT_USE_NAMESPACE
@@ -15,12 +19,14 @@ QT_USE_NAMESPACE
*/
QDeclarativePlace::QDeclarativePlace(QObject* parent)
-: QObject(parent), m_reviewModel(0), m_mediaModel(0)
+: QObject(parent), m_reviewModel(0), m_mediaModel(0), m_detailsReply(0), m_plugin(0),
+ m_complete(false)
{
}
QDeclarativePlace::QDeclarativePlace(const QGeoPlace &src, QObject *parent)
-: QObject(parent), m_reviewModel(0), m_mediaModel(0), m_src(src)
+: QObject(parent), m_reviewModel(0), m_mediaModel(0), m_src(src), m_detailsReply(0), m_plugin(0),
+ m_complete(false)
{
synchronizeCategories();
synchronizeContacts();
@@ -35,6 +41,33 @@ QDeclarativePlace::~QDeclarativePlace()
{
}
+// From QDeclarativeParserStatus
+void QDeclarativePlace::componentComplete()
+{
+ m_complete = true;
+}
+
+void QDeclarativePlace::setPlugin(QDeclarativeGeoServiceProvider *plugin)
+{
+ if (m_plugin == plugin)
+ return;
+
+ m_plugin = plugin;
+ if (m_complete)
+ emit pluginChanged();
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager || serviceProvider->error() != QGeoServiceProvider::NoError) {
+ qmlInfo(this) << tr("Warning: Plugin does not support places.");
+ return;
+ }
+}
+
+QDeclarativeGeoServiceProvider* QDeclarativePlace::plugin() const
+{
+ return m_plugin;
+}
+
QDeclarativeReviewModel *QDeclarativePlace::reviewModel()
{
if (!m_reviewModel) {
@@ -300,7 +333,7 @@ QStringList QDeclarativePlace::tags() const
}
/*!
- \qmlproperty qint64 Place::detailsFetched()
+ \qmlproperty bool Place::detailsFetched
This property holds a boolean indicating
whether the details of the place have been fetched
@@ -320,6 +353,56 @@ bool QDeclarativePlace::detailsFetched() const
}
/*!
+ \qmlproperty bool Place::fetchingDetails
+
+ This property holds a boolean indicating whether the details are currently being fetched.
+*/
+void QDeclarativePlace::setFetchingDetails(bool fetching)
+{
+ if (fetching && m_detailsReply)
+ return;
+
+ if (!fetching && !m_detailsReply)
+ return;
+
+ if (!fetching && m_detailsReply) {
+ m_detailsReply->abort();
+ m_detailsReply->deleteLater();
+ m_detailsReply = 0;
+ emit fetchingDetailsChanged();
+ return;
+ }
+
+ if (!m_plugin) {
+ qmlInfo(this) << "plugin not set.";
+ return;
+ }
+
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ if (!serviceProvider)
+ return;
+
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager) {
+ qmlInfo(this) << tr("Places not supported by %1 Plugin.").arg(m_plugin->name());
+ return;
+ }
+
+ m_detailsReply = placeManager->getPlaceDetails(placeId());
+
+ connect(m_detailsReply, SIGNAL(finished()), this, SLOT(detailsFetchedFinished()));
+ connect(m_detailsReply, SIGNAL(error(QPlaceReply::Error)),
+ this, SLOT(detailsError(QPlaceReply::Error)));
+
+ emit fetchingDetailsChanged();
+}
+
+bool QDeclarativePlace::fetchingDetails() const
+{
+ return m_detailsReply;
+}
+
+/*!
\qmlproperty stringlist Place::feeds
This property holds feeds list.
@@ -337,6 +420,58 @@ QStringList QDeclarativePlace::feeds() const
return m_src.feeds();
}
+void QDeclarativePlace::detailsFetchedFinished()
+{
+ QGeoPlace details = m_detailsReply->result();
+
+ setPlace(details);
+
+ m_detailsReply->deleteLater();
+ m_detailsReply = 0;
+ emit fetchingDetailsChanged();
+}
+
+void QDeclarativePlace::detailsError(QPlaceReply::Error error)
+{
+ Q_UNUSED(error);
+
+ m_detailsReply->deleteLater();
+ m_detailsReply = 0;
+ emit fetchingDetailsChanged();
+}
+
+/*!
+ \qmlmethod void Place::getDetails()
+
+ This methods starts fetching place details.
+
+ \sa Place::fetchingDetails
+*/
+void QDeclarativePlace::getDetails()
+{
+ setFetchingDetails(true);
+}
+
+void QDeclarativePlace::ratePlace(qreal rating)
+{
+ if (!m_plugin) {
+ qmlInfo(this) << tr("plugin not set.");
+ return;
+ }
+
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ if (!serviceProvider)
+ return;
+
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager) {
+ qmlInfo(this) << tr("Places not supported by %1 Plugin.").arg(m_plugin->name());
+ return;
+ }
+
+ placeManager->postRating(placeId(), rating);
+}
+
/*!
\qmlproperty QDeclarativeListProperty<QDeclarativeCategory> Place::categories
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplace_p.h b/src/imports/location/declarativeplaces/qdeclarativeplace_p.h
index cab3afdc..dfeef5ca 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplace_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativeplace_p.h
@@ -16,10 +16,13 @@
QT_BEGIN_NAMESPACE
-class QDeclarativePlace : public QObject
+class QDeclarativePlace : public QObject, public QDeclarativeParserStatus
{
Q_OBJECT
+ Q_ENUMS(Status)
+
+ Q_PROPERTY(QDeclarativeGeoServiceProvider *plugin READ plugin WRITE setPlugin NOTIFY pluginChanged)
Q_PROPERTY(QVariantHash additionalData READ additionalData WRITE setAdditionalData NOTIFY additionalDataChanged);
Q_PROPERTY(QDeclarativeListProperty<QDeclarativeCategory> categories READ categories NOTIFY categoriesChanged)
Q_PROPERTY(QDeclarativeListProperty<QDeclarativeContact> contacts READ contacts NOTIFY contactsChanged)
@@ -34,14 +37,24 @@ class QDeclarativePlace : public QObject
Q_PROPERTY(QString shortDescription READ shortDescription WRITE setShortDescription NOTIFY shortDescriptionChanged);
Q_PROPERTY(QStringList tags READ tags WRITE setTags NOTIFY tagsChanged);
Q_PROPERTY(bool detailsFetched READ detailsFetched WRITE setDetailsFetched NOTIFY detailsFetchedChanged);
+ Q_PROPERTY(bool fetchingDetails READ fetchingDetails WRITE setFetchingDetails NOTIFY fetchingDetailsChanged)
Q_PROPERTY(QDeclarativeReviewModel *reviewModel READ reviewModel NOTIFY reviewModelChanged)
Q_PROPERTY(QDeclarativeMediaModel *mediaModel READ mediaModel NOTIFY mediaModelChanged)
+ Q_INTERFACES(QDeclarativeParserStatus)
+
public:
explicit QDeclarativePlace(QObject* parent = 0);
explicit QDeclarativePlace(const QGeoPlace &src, QObject* parent = 0);
~QDeclarativePlace();
+ // From QDeclarativeParserStatus
+ virtual void classBegin() {}
+ virtual void componentComplete();
+
+ void setPlugin(QDeclarativeGeoServiceProvider *plugin);
+ QDeclarativeGeoServiceProvider* plugin() const;
+
QDeclarativeReviewModel *reviewModel();
QDeclarativeMediaModel *mediaModel();
@@ -92,8 +105,14 @@ public:
void setTags(const QStringList &tags);
bool detailsFetched() const;
void setDetailsFetched(bool fetched);
+ bool fetchingDetails() const;
+ void setFetchingDetails(bool fetching);
+
+ Q_INVOKABLE void getDetails();
+ Q_INVOKABLE void ratePlace(qreal rating);
signals:
+ void pluginChanged();
void additionalDataChanged();
void categoriesChanged();
void contactsChanged();
@@ -108,9 +127,14 @@ signals:
void shortDescriptionChanged();
void tagsChanged();
void detailsFetchedChanged();
+ void fetchingDetailsChanged();
void reviewModelChanged();
void mediaModelChanged();
+private slots:
+ void detailsFetchedFinished();
+ void detailsError(QPlaceReply::Error error);
+
private:
void synchronizeCategories();
void synchronizeContacts();
@@ -129,6 +153,11 @@ private:
QDeclarativeMediaModel *m_mediaModel;
QGeoPlace m_src;
+
+ QPlaceDetailsReply *m_detailsReply;
+
+ QDeclarativeGeoServiceProvider *m_plugin;
+ bool m_complete;
};
QT_END_NAMESPACE
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplacemanager.cpp b/src/imports/location/declarativeplaces/qdeclarativeplacemanager.cpp
deleted file mode 100644
index 3f3228fc..00000000
--- a/src/imports/location/declarativeplaces/qdeclarativeplacemanager.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-#include "qdeclarativeplacemanager_p.h"
-
-QT_USE_NAMESPACE
-
-/*!
- \qmlclass PlaceManager QDeclarativePlaceManager
- \brief The PlaceManager element provides optionts to work with place content.
- \ingroup qml-places
-
- PlaceManager provides a access to additional options of place. User might request
- rich content, media, reviews. It is also possible to rate place.
-
- To use PlaceManager user need to create it in qml file.
- \code
- import places 1.0
-
- PlaceManager {
- id: placeManager
- }
-
- ...
- // Starts place details request
- placeManager.getPlaceDetails(place)
- ...
-
- // Starts place rating request
- placeManager.ratePlace(place, rate_value)
-
- \endcode
-
- \sa {QPlaceManager}
-*/
-QDeclarativePlaceManager::QDeclarativePlaceManager(QObject *parent) :
- QObject(parent),
- m_place(NULL),
- m_manager(NULL),
- m_response(NULL)
-{
- m_manager = new QPlaceManager(this);
- m_manager->initializeCategories();
-}
-
-QDeclarativePlaceManager::~QDeclarativePlaceManager()
-{
-}
-
-/*!
- \qmlsignal PlaceManager::requestFinished(const int &error)
-
- This handler is called when the request processing is finished.
- 0 means that no error occurs during processing and new data were
- added to \l Place object.
-*/
-
-/*!
- \qmlproperty Place PlaceManager::place
-
- This element holds current \l Place object for which data are requested.
- If no object returns null object.
-*/
-QDeclarativePlace *QDeclarativePlaceManager::place()
-{
- return m_place;
-}
-
-/*!
- \qmlmethod PlaceManager::getPlaceDetails()
- Gets additional data for place object. When data will be available
- user object will be updated.
-*/
-void QDeclarativePlaceManager::getPlaceDetails(QDeclarativePlace *place)
-{
- if (!m_manager) {
- m_manager = new QPlaceManager(this);
- }
- cancelPreviousRequest();
- connectNewResponse(m_manager->getPlaceDetails(place->placeId()));
- if (m_place != place) {
- m_place = place;
- emit placeChanged();
- }
-}
-
-/*!
- \qmlmethod PlaceManager::ratePlace()
- Gets additional data for place object. When data will be available
- user object will be updated.
-*/
-void QDeclarativePlaceManager::ratePlace(QDeclarativePlace *place, qreal rateValue, const QString &userName)
-{
- if (!m_manager) {
- m_manager = new QPlaceManager(this);
- }
- cancelPreviousRequest();
- //TODO: handling of user name when rating a place
- connectNewResponse(m_manager->postRating(place->place(), rateValue));
- if (m_place != place) {
- m_place = place;
- emit placeChanged();
- }
-}
-
-/*!
- \qmlmethod PlaceManager::cancelRequest()
- Cancels ongoing request.
-*/
-void QDeclarativePlaceManager::cancelRequest()
-{
- cancelPreviousRequest();
-}
-
-void QDeclarativePlaceManager::replyFinished()
-{
- if (!m_response || m_response->error()) {
- return;
- }
- if (m_response->type() == QPlaceReply::PlaceDetailsReply) {
- QPlaceDetailsReply *reply = qobject_cast<QPlaceDetailsReply*>(m_response);
- m_place->setPlace(reply->result());
- }
- m_response->deleteLater();
- m_response = NULL;
- emit requestFinished(0);
-}
-
-void QDeclarativePlaceManager::replyError(QPlaceReply::Error error,
- const QString &errorString)
-{
- Q_UNUSED(error);
- Q_UNUSED(errorString);
-
- emit requestFinished(-1);
-}
-
-void QDeclarativePlaceManager::cancelPreviousRequest()
-{
- if (m_response) {
- if (!m_response->isFinished()) {
- m_response->abort();
- }
- m_response->deleteLater();
- m_response = NULL;
- }
-}
-
-void QDeclarativePlaceManager::connectNewResponse(QPlaceReply *newResponse)
-{
- if (newResponse) {
- m_response = newResponse;
- m_response->setParent(this);
- connect(m_response, SIGNAL(finished()), this, SLOT(replyFinished()));
- connect(m_response, SIGNAL(error(QPlaceReply::Error,QString)),
- this, SLOT(replyError(QPlaceReply::Error,QString)));
- } else {
- emit requestFinished(-1);
- }
-}
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplacemanager_p.h b/src/imports/location/declarativeplaces/qdeclarativeplacemanager_p.h
deleted file mode 100644
index 6b4e48f6..00000000
--- a/src/imports/location/declarativeplaces/qdeclarativeplacemanager_p.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef QDECLARATIVEPLACEMANAGER_P_H
-#define QDECLARATIVEPLACEMANAGER_P_H
-
-#include <QObject>
-
-#include <qplacemanager.h>
-#include <qplacedetailsreply.h>
-
-#include "qdeclarativeplace_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QDeclarativePlaceManager : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(QDeclarativePlace* place READ place NOTIFY placeChanged);
-
-public:
- explicit QDeclarativePlaceManager(QObject *parent = 0);
- ~QDeclarativePlaceManager();
-
- QDeclarativePlace *place();
-
- Q_INVOKABLE void getPlaceDetails(QDeclarativePlace *place);
-
- Q_INVOKABLE void ratePlace(QDeclarativePlace *place, qreal rateValue, const QString &userName);
-
- Q_INVOKABLE void cancelRequest();
-
-signals:
- void requestFinished(const int &error);
- void placeChanged();
-
-private slots:
- void replyFinished();
- void replyError(QPlaceReply::Error error, const QString &errorString);
-
-private:
- void cancelPreviousRequest();
- void connectNewResponse(QPlaceReply *newResponse);
-
-private:
- QDeclarativePlace *m_place;
-
- QPlaceManager *m_manager;
- QPlaceReply *m_response;
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativePlaceManager));
-
-#endif // QDECLARATIVETEXTPREDICTIONMODEL_P_H
diff --git a/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp
index 712058d1..bd07e127 100644
--- a/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp
@@ -1,4 +1,8 @@
#include "qdeclarativerecommendationmodel_p.h"
+#include "qdeclarativegeoserviceprovider_p.h"
+
+#include <QtDeclarative/QDeclarativeInfo>
+#include <QtLocation/QGeoServiceProvider>
QT_USE_NAMESPACE
@@ -57,24 +61,48 @@ QT_USE_NAMESPACE
\sa SuggestionModel, SupportedCategoryModel, {QPlaceManager}
*/
-QDeclarativeRecommendationModel::QDeclarativeRecommendationModel(QObject *parent) :
- QAbstractListModel(parent),
- m_manager(NULL),
- m_response(NULL)
+QDeclarativeRecommendationModel::QDeclarativeRecommendationModel(QObject *parent)
+: QAbstractListModel(parent), m_response(0), m_plugin(0), m_complete(false)
{
QHash<int, QByteArray> roleNames;
roleNames = QAbstractItemModel::roleNames();
roleNames.insert(SearchResultRole, "searchResult");
setRoleNames(roleNames);
-
- m_manager = new QPlaceManager(this);
- m_manager->initializeCategories();
}
QDeclarativeRecommendationModel::~QDeclarativeRecommendationModel()
{
}
+// From QDeclarativeParserStatus
+void QDeclarativeRecommendationModel::componentComplete()
+{
+ m_complete = true;
+}
+
+
+void QDeclarativeRecommendationModel::setPlugin(QDeclarativeGeoServiceProvider *plugin)
+{
+ if (m_plugin == plugin)
+ return;
+
+ reset(); // reset the model
+ m_plugin = plugin;
+ if (m_complete)
+ emit pluginChanged();
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager || serviceProvider->error() != QGeoServiceProvider::NoError) {
+ qmlInfo(this) << tr("Warning: Plugin does not support places.");
+ return;
+ }
+}
+
+QDeclarativeGeoServiceProvider* QDeclarativeRecommendationModel::plugin() const
+{
+ return m_plugin;
+}
+
/*!
\qmlsignal RecommenadationModel::queryFinished(const int &error)
@@ -264,15 +292,27 @@ void QDeclarativeRecommendationModel::setLimit(const int &limit)
*/
void QDeclarativeRecommendationModel::executeQuery()
{
- if (!m_manager) {
- m_manager = new QPlaceManager(this);
+ if (!m_plugin) {
+ qmlInfo(this) << "plugin not set.";
+ return;
}
+
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ if (!serviceProvider)
+ return;
+
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager) {
+ qmlInfo(this) << tr("Places not supported by %1 Plugin.").arg(m_plugin->name());
+ return;
+ }
+
cancelPreviousRequest();
QGeoPlace target;
target.setPlaceId(m_queryParameters.searchTerm());
m_queryParameters.setSearchArea(m_searchArea->area());
- connectNewResponse(m_manager->recommendations(target, m_queryParameters));
+ connectNewResponse(placeManager->recommendations(target, m_queryParameters));
}
/*!
diff --git a/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel_p.h b/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel_p.h
index 4485f5c8..e30bac89 100644
--- a/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel_p.h
@@ -13,20 +13,30 @@
QT_BEGIN_NAMESPACE
-class QDeclarativeRecommendationModel : public QAbstractListModel
+class QDeclarativeRecommendationModel : public QAbstractListModel, public QDeclarativeParserStatus
{
Q_OBJECT
+ Q_PROPERTY(QDeclarativeGeoServiceProvider *plugin READ plugin WRITE setPlugin NOTIFY pluginChanged)
Q_PROPERTY(QString placeId READ placeId WRITE setPlaceId NOTIFY placeIdChanged);
Q_PROPERTY(QDeclarativeGeoBoundingArea* searchArea READ searchArea WRITE setSearchArea NOTIFY searchAreaChanged);
Q_PROPERTY(int offset READ offset WRITE setOffset NOTIFY offsetChanged);
Q_PROPERTY(int limit READ limit WRITE setLimit NOTIFY limitChanged);
-
Q_PROPERTY(QDeclarativeListProperty<QDeclarativeSearchResult> results READ results NOTIFY resultsChanged)
+
+ Q_INTERFACES(QDeclarativeParserStatus)
+
public:
explicit QDeclarativeRecommendationModel(QObject *parent = 0);
~QDeclarativeRecommendationModel();
+ // From QDeclarativeParserStatus
+ virtual void classBegin() {}
+ virtual void componentComplete();
+
+ void setPlugin(QDeclarativeGeoServiceProvider *plugin);
+ QDeclarativeGeoServiceProvider* plugin() const;
+
QDeclarativeListProperty<QDeclarativeSearchResult> results();
static void results_append(QDeclarativeListProperty<QDeclarativeSearchResult> *prop,
QDeclarativeSearchResult* result);
@@ -54,6 +64,7 @@ public:
Q_INVOKABLE void cancelRequest();
signals:
+ void pluginChanged();
void queryFinished(const int &error);
void placeIdChanged();
@@ -77,8 +88,10 @@ private:
QPlaceSearchQuery m_queryParameters;
- QPlaceManager *m_manager;
QPlaceSearchReply *m_response;
+
+ QDeclarativeGeoServiceProvider *m_plugin;
+ bool m_complete;
};
QT_END_NAMESPACE
diff --git a/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp
index 6364a4c6..89f562e3 100644
--- a/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativereviewmodel.cpp
@@ -1,5 +1,9 @@
#include "qdeclarativereviewmodel_p.h"
-#include <qdeclarativeplace_p.h>
+#include "qdeclarativegeoserviceprovider_p.h"
+#include "qdeclarativeplace_p.h"
+
+#include <QtDeclarative/QDeclarativeInfo>
+#include <QtLocation/QGeoServiceProvider>
QT_USE_NAMESPACE
@@ -19,8 +23,8 @@ QT_USE_NAMESPACE
*/
QDeclarativeReviewModel::QDeclarativeReviewModel(QObject* parent)
-: QAbstractListModel(parent), m_place(0), m_batchSize(1), m_reviewCount(-1),
- m_manager(new QPlaceManager(this)), m_reply(0)
+: QAbstractListModel(parent), m_place(0), m_batchSize(1), m_reviewCount(-1), m_reply(0),
+ m_plugin(0), m_complete(false)
{
QHash<int, QByteArray> roleNames;
roleNames.insert(ReviewRole, "review");
@@ -32,6 +36,28 @@ QDeclarativeReviewModel::~QDeclarativeReviewModel()
qDeleteAll(m_reviews);
}
+void QDeclarativeReviewModel::setPlugin(QDeclarativeGeoServiceProvider *plugin)
+{
+ if (m_plugin == plugin)
+ return;
+
+ reset(); // reset the model
+ m_plugin = plugin;
+ if (m_complete)
+ emit pluginChanged();
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager || serviceProvider->error() != QGeoServiceProvider::NoError) {
+ qmlInfo(this) << tr("Warning: Plugin does not support places.");
+ return;
+ }
+}
+
+QDeclarativeGeoServiceProvider* QDeclarativeReviewModel::plugin() const
+{
+ return m_plugin;
+}
+
/*!
\qmlproperty Place ReviewModel::place
@@ -52,10 +78,15 @@ void QDeclarativeReviewModel::setPlace(QDeclarativePlace *place)
m_reply = 0;
}
qDeleteAll(m_reviews);
+ m_reviews.clear();
endResetModel();
- m_reviewCount = -1;
- emit totalCountChanged();
+ if (m_reviewCount != -1) {
+ m_reviewCount = -1;
+ emit totalCountChanged();
+ }
+
+ setPlugin(place->plugin());
m_place = place;
emit placeChanged();
@@ -134,6 +165,21 @@ void QDeclarativeReviewModel::fetchMore(const QModelIndex &parent)
if (m_reply)
return;
+ if (!m_plugin) {
+ qmlInfo(this) << "plugin not set.";
+ return;
+ }
+
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ if (!serviceProvider)
+ return;
+
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager) {
+ qmlInfo(this) << tr("Places not supported by %1 Plugin.").arg(m_plugin->name());
+ return;
+ }
+
QPlaceQuery query;
if (m_reviewCount == -1) {
@@ -148,7 +194,7 @@ void QDeclarativeReviewModel::fetchMore(const QModelIndex &parent)
query.setLimit(qMin(m_batchSize, missing.second - missing.first + 1));
}
- m_reply = m_manager->getReviews(m_place->place(), query);
+ m_reply = placeManager->getReviews(m_place->place(), query);
connect(m_reply, SIGNAL(finished()), this, SLOT(fetchFinished()), Qt::QueuedConnection);
}
@@ -169,6 +215,7 @@ void QDeclarativeReviewModel::classBegin()
void QDeclarativeReviewModel::componentComplete()
{
+ m_complete = true;
fetchMore(QModelIndex());
}
diff --git a/src/imports/location/declarativeplaces/qdeclarativereviewmodel_p.h b/src/imports/location/declarativeplaces/qdeclarativereviewmodel_p.h
index 90abf937..7d93cfd4 100644
--- a/src/imports/location/declarativeplaces/qdeclarativereviewmodel_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativereviewmodel_p.h
@@ -9,6 +9,8 @@
QT_BEGIN_NAMESPACE
class QDeclarativePlace;
+class QDeclarativeGeoServiceProvider;
+class QGeoServiceProvider;
class QDeclarativeReviewModel : public QAbstractListModel, public QDeclarativeParserStatus
{
@@ -16,6 +18,7 @@ class QDeclarativeReviewModel : public QAbstractListModel, public QDeclarativePa
Q_INTERFACES(QDeclarativeParserStatus)
+ Q_PROPERTY(QDeclarativeGeoServiceProvider *plugin READ plugin WRITE setPlugin NOTIFY pluginChanged)
Q_PROPERTY(QDeclarativePlace *place READ place WRITE setPlace NOTIFY placeChanged)
Q_PROPERTY(int batchSize READ batchSize WRITE setBatchSize NOTIFY batchSizeChanged)
Q_PROPERTY(int totalCount READ totalCount NOTIFY totalCountChanged)
@@ -24,6 +27,9 @@ public:
explicit QDeclarativeReviewModel(QObject* parent = 0);
~QDeclarativeReviewModel();
+ void setPlugin(QDeclarativeGeoServiceProvider *plugin);
+ QDeclarativeGeoServiceProvider* plugin() const;
+
QDeclarativePlace *place() const;
void setPlace(QDeclarativePlace *place);
@@ -47,6 +53,7 @@ public:
void componentComplete();
signals:
+ void pluginChanged();
void placeChanged();
void batchSizeChanged();
void totalCountChanged();
@@ -59,8 +66,10 @@ private:
int m_batchSize;
int m_reviewCount;
QMap<int, QDeclarativeReview *> m_reviews;
- QPlaceManager *m_manager;
QPlaceReviewReply *m_reply;
+
+ QDeclarativeGeoServiceProvider *m_plugin;
+ bool m_complete;
};
QT_END_NAMESPACE
diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchresult.cpp b/src/imports/location/declarativeplaces/qdeclarativesearchresult.cpp
index 44f0d97f..68a2af86 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesearchresult.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativesearchresult.cpp
@@ -1,4 +1,7 @@
#include "qdeclarativesearchresult_p.h"
+#include "qdeclarativegeoserviceprovider_p.h"
+
+#include <QtDeclarative/QDeclarativeProperty>
QT_USE_NAMESPACE
@@ -16,6 +19,9 @@ QT_USE_NAMESPACE
QDeclarativeSearchResult::QDeclarativeSearchResult(QObject* parent)
: QObject(parent)
{
+ QDeclarativeProperty pluginProp(parent, "plugin");
+ if (pluginProp.isValid())
+ m_place.setPlugin(qobject_cast<QDeclarativeGeoServiceProvider *>(pluginProp.read().value<QObject *>()));
}
QDeclarativeSearchResult::QDeclarativeSearchResult(const QPlaceSearchResult &src,
@@ -24,6 +30,9 @@ QDeclarativeSearchResult::QDeclarativeSearchResult(const QPlaceSearchResult &src
m_place(src.place()),
m_src(src)
{
+ QDeclarativeProperty pluginProp(parent, "plugin");
+ if (pluginProp.isValid())
+ m_place.setPlugin(qobject_cast<QDeclarativeGeoServiceProvider *>(pluginProp.read().value<QObject *>()));
}
QDeclarativeSearchResult::~QDeclarativeSearchResult()
diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
index 22d82758..1549c0ab 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
@@ -1,4 +1,8 @@
#include "qdeclarativesearchresultmodel_p.h"
+#include "qdeclarativegeoserviceprovider_p.h"
+
+#include <QtDeclarative/QDeclarativeInfo>
+#include <QtLocation/QGeoServiceProvider>
QT_USE_NAMESPACE
@@ -58,24 +62,47 @@ QT_USE_NAMESPACE
\sa SuggestionModel, SupportedCategoryModel, {QPlaceManager}
*/
-QDeclarativeSearchResultModel::QDeclarativeSearchResultModel(QObject *parent) :
- QAbstractListModel(parent),
- m_manager(NULL),
- m_response(NULL)
+QDeclarativeSearchResultModel::QDeclarativeSearchResultModel(QObject *parent)
+: QAbstractListModel(parent), m_response(0), m_plugin(0), m_complete(false)
{
QHash<int, QByteArray> roleNames;
roleNames = QAbstractItemModel::roleNames();
roleNames.insert(SearchResultRole, "searchResult");
setRoleNames(roleNames);
-
- m_manager = new QPlaceManager(this);
- m_manager->initializeCategories();
}
QDeclarativeSearchResultModel::~QDeclarativeSearchResultModel()
{
}
+// From QDeclarativeParserStatus
+void QDeclarativeSearchResultModel::componentComplete()
+{
+ m_complete = true;
+}
+
+void QDeclarativeSearchResultModel::setPlugin(QDeclarativeGeoServiceProvider *plugin)
+{
+ if (m_plugin == plugin)
+ return;
+
+ reset(); // reset the model
+ m_plugin = plugin;
+ if (m_complete)
+ emit pluginChanged();
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager || serviceProvider->error() != QGeoServiceProvider::NoError) {
+ qmlInfo(this) << tr("Warning: Plugin does not support places.");
+ return;
+ }
+}
+
+QDeclarativeGeoServiceProvider* QDeclarativeSearchResultModel::plugin() const
+{
+ return m_plugin;
+}
+
/*!
\qmlsignal SearchResultModel::queryFinished(const int &error)
@@ -308,13 +335,26 @@ void QDeclarativeSearchResultModel::setDidYouMean(const int &didYouMeanSuggestio
*/
void QDeclarativeSearchResultModel::executeQuery()
{
- if (!m_manager) {
- m_manager = new QPlaceManager(this);
+ if (!m_plugin) {
+ qmlInfo(this) << "plugin not set.";
+ return;
}
+
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ if (!serviceProvider)
+ return;
+
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager) {
+ qmlInfo(this) << tr("Places not supported by %1 Plugin.").arg(m_plugin->name());
+ return;
+ }
+
cancelPreviousRequest();
m_queryParameters.setSearchArea(m_searchArea->area());
- connectNewResponse(m_manager->searchForPlaces(m_queryParameters, QPlaceManager::PublicScope));
+ connectNewResponse(placeManager->searchForPlaces(m_queryParameters,
+ QPlaceManager::PublicScope));
}
/*!
diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
index 931f69c5..a64ec9be 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
@@ -12,23 +12,29 @@
QT_BEGIN_NAMESPACE
-class QDeclarativeSearchResultModel : public QAbstractListModel
+class QDeclarativeSearchResultModel : public QAbstractListModel, public QDeclarativeParserStatus
{
Q_OBJECT
+ Q_PROPERTY(QDeclarativeGeoServiceProvider *plugin READ plugin WRITE setPlugin NOTIFY pluginChanged)
Q_PROPERTY(QString searchTerm READ searchTerm WRITE setSearchTerm NOTIFY searchTermChanged);
Q_PROPERTY(QDeclarativeCategory* searchCategory READ searchCategory WRITE setSearchCategory NOTIFY searchCategoryChanged);
Q_PROPERTY(QDeclarativeGeoBoundingArea *searchArea READ searchArea WRITE setSearchArea NOTIFY searchAreaChanged);
Q_PROPERTY(int offset READ offset WRITE setOffset NOTIFY offsetChanged);
Q_PROPERTY(int limit READ limit WRITE setLimit NOTIFY limitChanged);
Q_PROPERTY(int didYouMean READ didYouMean WRITE setDidYouMean NOTIFY didYouMeanChanged);
-
Q_PROPERTY(QDeclarativeListProperty<QDeclarativeSearchResult> results READ results NOTIFY resultsChanged)
+ Q_INTERFACES(QDeclarativeParserStatus)
+
public:
explicit QDeclarativeSearchResultModel(QObject *parent = 0);
~QDeclarativeSearchResultModel();
+ // From QDeclarativeParserStatus
+ virtual void classBegin() {}
+ virtual void componentComplete();
+
QDeclarativeListProperty<QDeclarativeSearchResult> results();
static void results_append(QDeclarativeListProperty<QDeclarativeSearchResult> *prop,
QDeclarativeSearchResult* result);
@@ -43,6 +49,9 @@ public:
SearchResultRole = Qt::UserRole + 500
};
+ void setPlugin(QDeclarativeGeoServiceProvider *plugin);
+ QDeclarativeGeoServiceProvider* plugin() const;
+
QString searchTerm() const;
void setSearchTerm(const QString &searchTerm);
QDeclarativeCategory *searchCategory();
@@ -63,6 +72,7 @@ public:
Q_INVOKABLE void clearSearchTerm();
signals:
+ void pluginChanged();
void queryFinished(const int &error);
void searchTermChanged();
@@ -90,8 +100,10 @@ private:
QPlaceSearchQuery m_queryParameters;
- QPlaceManager *m_manager;
QPlaceSearchReply *m_response;
+
+ QDeclarativeGeoServiceProvider *m_plugin;
+ bool m_complete;
};
QT_END_NAMESPACE
diff --git a/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp
index df4b958e..580e0602 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel.cpp
@@ -1,4 +1,7 @@
#include "qdeclarativesupportedcategoriesmodel_p.h"
+#include "qgeoserviceprovider.h"
+
+#include <QtDeclarative/QDeclarativeInfo>
#include <qplacemanager.h>
@@ -38,8 +41,8 @@ QT_USE_NAMESPACE
\sa SearchResultModel, SuggestionModel, {QPlaceManager}
*/
-QDeclarativeSupportedCategoriesModel::QDeclarativeSupportedCategoriesModel(QObject *parent) :
- QAbstractListModel(parent)
+QDeclarativeSupportedCategoriesModel::QDeclarativeSupportedCategoriesModel(QObject *parent)
+: QAbstractListModel(parent), m_plugin(0), m_complete(false)
{
#if defined(QT_PLACESPLUGIN_LOGGING)
qDebug() << "QDeclarativeSupportedCategoriesModel::QDeclarativeSupportedCategoriesModel";
@@ -48,17 +51,6 @@ QDeclarativeSupportedCategoriesModel::QDeclarativeSupportedCategoriesModel(QObje
roleNames = QAbstractItemModel::roleNames();
roleNames.insert(CategoryRole, "category");
setRoleNames(roleNames);
-
- m_manager = new QPlaceManager(this);
- m_categories = m_manager->categories();
- convertCategoriesToDeclarative();
-
- m_response = m_manager->initializeCategories();
- if (m_response) {
- connect(m_response, SIGNAL(finished()), this, SLOT(replyFinished()));
- connect(m_response, SIGNAL(error(QPlaceReply::Error,QString)),
- this, SLOT(replyError(QPlaceReply::Error,QString)));
- }
}
QDeclarativeSupportedCategoriesModel::~QDeclarativeSupportedCategoriesModel()
@@ -72,6 +64,12 @@ QDeclarativeSupportedCategoriesModel::~QDeclarativeSupportedCategoriesModel()
}
}
+// From QDeclarativeParserStatus
+void QDeclarativeSupportedCategoriesModel::componentComplete()
+{
+ m_complete = true;
+}
+
/*!
\qmlsignal SupportedCategoryModel::categoriesChanged()
@@ -109,6 +107,38 @@ QVariant QDeclarativeSupportedCategoriesModel::data(const QModelIndex& index, in
return QVariant();
}
+void QDeclarativeSupportedCategoriesModel::setPlugin(QDeclarativeGeoServiceProvider *plugin)
+{
+ if (m_plugin == plugin)
+ return;
+
+ reset(); // reset the model
+ m_plugin = plugin;
+ if (m_complete)
+ emit pluginChanged();
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager || serviceProvider->error() != QGeoServiceProvider::NoError) {
+ qmlInfo(this) << tr("Warning: Plugin does not support places.");
+ return;
+ }
+
+ m_categories = placeManager->categories();
+ convertCategoriesToDeclarative();
+
+ m_response = placeManager->initializeCategories();
+ if (m_response) {
+ connect(m_response, SIGNAL(finished()), this, SLOT(replyFinished()));
+ connect(m_response, SIGNAL(error(QPlaceReply::Error,QString)),
+ this, SLOT(replyError(QPlaceReply::Error,QString)));
+ }
+}
+
+QDeclarativeGeoServiceProvider* QDeclarativeSupportedCategoriesModel::plugin() const
+{
+ return m_plugin;
+}
+
/*!
\qmlproperty QDeclarativeListProperty SupportedCategoryModel::categories
@@ -156,15 +186,32 @@ void QDeclarativeSupportedCategoriesModel::categories_clear(QDeclarativeListProp
void QDeclarativeSupportedCategoriesModel::replyFinished()
{
- if (m_response) {
- beginResetModel();
- m_categories = m_manager->categories();
- convertCategoriesToDeclarative();
- endResetModel();
- emit categoriesChanged();
- m_response->deleteLater();
- m_response = NULL;
+ if (!m_response)
+ return;
+
+ m_response->deleteLater();
+ m_response = 0;
+
+ if (!m_plugin) {
+ qmlInfo(this) << "plugin not set.";
+ return;
+ }
+
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ if (!serviceProvider)
+ return;
+
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager) {
+ qmlInfo(this) << tr("Places not supported by %1 Plugin.").arg(m_plugin->name());
+ return;
}
+
+ beginResetModel();
+ m_categories = placeManager->categories();
+ convertCategoriesToDeclarative();
+ endResetModel();
+ emit categoriesChanged();
}
void QDeclarativeSupportedCategoriesModel::replyError(QPlaceReply::Error error,
diff --git a/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel_p.h b/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel_p.h
index 91e93c1e..6fefa00b 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativesupportedcategoriesmodel_p.h
@@ -1,6 +1,8 @@
#ifndef QDECLARATIVESUPPORTEDCATEGORIESMODEL_H
#define QDECLARATIVESUPPORTEDCATEGORIESMODEL_H
+#include "qdeclarativegeoserviceprovider_p.h"
+
#include <QObject>
#include <QAbstractListModel>
#include <QDeclarativeListProperty>
@@ -13,15 +15,25 @@
QT_BEGIN_NAMESPACE
-class QDeclarativeSupportedCategoriesModel : public QAbstractListModel
+class QGeoServiceProvider;
+
+class QDeclarativeSupportedCategoriesModel : public QAbstractListModel, public QDeclarativeParserStatus
{
Q_OBJECT
+ Q_PROPERTY(QDeclarativeGeoServiceProvider *plugin READ plugin WRITE setPlugin NOTIFY pluginChanged)
Q_PROPERTY(QDeclarativeListProperty<QDeclarativeCategory> categories READ categories NOTIFY categoriesChanged)
+
+ Q_INTERFACES(QDeclarativeParserStatus)
+
public:
explicit QDeclarativeSupportedCategoriesModel(QObject *parent = 0);
virtual ~QDeclarativeSupportedCategoriesModel();
+ // From QDeclarativeParserStatus
+ virtual void classBegin() {}
+ virtual void componentComplete();
+
QDeclarativeListProperty<QDeclarativeCategory> categories();
static void categories_append(QDeclarativeListProperty<QDeclarativeCategory> *prop,
QDeclarativeCategory* category);
@@ -37,8 +49,13 @@ public:
enum Roles {
CategoryRole = Qt::UserRole + 500
};
+
+ void setPlugin(QDeclarativeGeoServiceProvider *plugin);
+ QDeclarativeGeoServiceProvider* plugin() const;
+
signals:
void categoriesChanged();
+ void pluginChanged();
private slots:
void replyFinished();
@@ -47,10 +64,12 @@ private slots:
private:
void convertCategoriesToDeclarative();
- QPlaceManager *m_manager;
QPlaceReply *m_response;
QList<QPlaceCategory> m_categories;
QMap<QString, QDeclarativeCategory*> m_categoryMap;
+
+ QDeclarativeGeoServiceProvider *m_plugin;
+ bool m_complete;
};
QT_END_NAMESPACE
diff --git a/src/imports/location/declarativeplaces/qdeclarativetextpredictionmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativetextpredictionmodel.cpp
index 9539cb84..6921bd2b 100644
--- a/src/imports/location/declarativeplaces/qdeclarativetextpredictionmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativetextpredictionmodel.cpp
@@ -1,4 +1,8 @@
#include "qdeclarativetextpredictionmodel_p.h"
+#include "qdeclarativegeoserviceprovider_p.h"
+
+#include <QtDeclarative/QDeclarativeInfo>
+#include <QtLocation/QGeoServiceProvider>
#include <qplacemanager.h>
#include <qplacesearchquery.h>
@@ -55,18 +59,13 @@ QT_USE_NAMESPACE
\sa {QPlaceManager}
*/
-QDeclarativeTextPredictionModel::QDeclarativeTextPredictionModel(QObject *parent) :
- QAbstractListModel(parent),
- m_manager(NULL),
- m_response(NULL)
+QDeclarativeTextPredictionModel::QDeclarativeTextPredictionModel(QObject *parent)
+: QAbstractListModel(parent), m_response(0), m_plugin(0), m_complete(false)
{
QHash<int, QByteArray> roleNames;
roleNames = QAbstractItemModel::roleNames();
roleNames.insert(TextPredictionRole, "textPrediction");
setRoleNames(roleNames);
-
- m_manager = new QPlaceManager(this);
- m_manager->initializeCategories();
}
QDeclarativeTextPredictionModel::~QDeclarativeTextPredictionModel()
@@ -74,6 +73,32 @@ QDeclarativeTextPredictionModel::~QDeclarativeTextPredictionModel()
}
/*!
+ \qmlproperty Plugin MediaModel::plugin
+
+ This property holds the provider Plugin used by this model.
+*/
+void QDeclarativeTextPredictionModel::setPlugin(QDeclarativeGeoServiceProvider *plugin)
+{
+ if (m_plugin == plugin)
+ return;
+ reset(); // reset the model
+ m_plugin = plugin;
+ if (m_complete)
+ emit pluginChanged();
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager || serviceProvider->error() != QGeoServiceProvider::NoError) {
+ qmlInfo(this) << tr("Warning: Plugin does not support places.");
+ return;
+ }
+}
+
+QDeclarativeGeoServiceProvider* QDeclarativeTextPredictionModel::plugin() const
+{
+ return m_plugin;
+}
+
+/*!
\qmlsignal TextPredictionModel::queryFinished(const int &error)
This handler is called when the request processing is finished.
@@ -213,13 +238,25 @@ void QDeclarativeTextPredictionModel::setLimit(const int &limit)
*/
void QDeclarativeTextPredictionModel::executeQuery()
{
- if (!m_manager) {
- m_manager = new QPlaceManager(this);
+ if (!m_plugin) {
+ qmlInfo(this) << "plugin not set.";
+ return;
}
+
+ QGeoServiceProvider *serviceProvider = m_plugin->sharedGeoServiceProvider();
+ if (!serviceProvider)
+ return;
+
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager) {
+ qmlInfo(this) << tr("Places not supported by %1 Plugin.").arg(m_plugin->name());
+ return;
+ }
+
cancelPreviousRequest();
m_queryParameters.setSearchArea(m_searchArea->area());
- connectNewResponse(m_manager->textPredictions(m_queryParameters));
+ connectNewResponse(placeManager->textPredictions(m_queryParameters));
}
/*!
@@ -273,3 +310,12 @@ void QDeclarativeTextPredictionModel::connectNewResponse(QPlaceTextPredictionRep
emit queryFinished(-1);
}
}
+
+void QDeclarativeTextPredictionModel::classBegin()
+{
+}
+
+void QDeclarativeTextPredictionModel::componentComplete()
+{
+ m_complete = true;
+}
diff --git a/src/imports/location/declarativeplaces/qdeclarativetextpredictionmodel_p.h b/src/imports/location/declarativeplaces/qdeclarativetextpredictionmodel_p.h
index 4d9e9bef..72081aad 100644
--- a/src/imports/location/declarativeplaces/qdeclarativetextpredictionmodel_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativetextpredictionmodel_p.h
@@ -13,20 +13,29 @@
QT_BEGIN_NAMESPACE
-class QDeclarativeTextPredictionModel : public QAbstractListModel
+class QDeclarativeGeoServiceProvider;
+class QGeoServiceProvider;
+
+class QDeclarativeTextPredictionModel : public QAbstractListModel, public QDeclarativeParserStatus
{
Q_OBJECT
+ Q_INTERFACES(QDeclarativeParserStatus)
+
+ Q_PROPERTY(QDeclarativeGeoServiceProvider *plugin READ plugin WRITE setPlugin NOTIFY pluginChanged)
Q_PROPERTY(QString searchTerm READ searchTerm WRITE setSearchTerm NOTIFY searchTermChanged);
Q_PROPERTY(QDeclarativeGeoBoundingArea* searchArea READ searchArea WRITE setSearchArea NOTIFY searchAreaChanged);
Q_PROPERTY(int offset READ offset WRITE setOffset NOTIFY offsetChanged);
Q_PROPERTY(int limit READ limit WRITE setLimit NOTIFY limitChanged);
-
Q_PROPERTY(QStringList predictions READ predictions NOTIFY predictionsChanged)
+
public:
explicit QDeclarativeTextPredictionModel(QObject *parent = 0);
~QDeclarativeTextPredictionModel();
+ void setPlugin(QDeclarativeGeoServiceProvider *plugin);
+ QDeclarativeGeoServiceProvider* plugin() const;
+
QStringList getSuggestions() const;
// From QAbstractListModel
@@ -50,7 +59,12 @@ public:
Q_INVOKABLE void executeQuery();
Q_INVOKABLE void cancelRequest();
+ void classBegin();
+ void componentComplete();
+
signals:
+ void pluginChanged();
+
void queryFinished(const int &error);
void searchTermChanged();
@@ -72,8 +86,10 @@ private:
QDeclarativeGeoBoundingArea *m_searchArea;
QPlaceSearchQuery m_queryParameters;
- QPlaceManager *m_manager;
QPlaceTextPredictionReply *m_response;
+
+ QDeclarativeGeoServiceProvider *m_plugin;
+ bool m_complete;
};
QT_END_NAMESPACE
diff --git a/src/imports/location/location.cpp b/src/imports/location/location.cpp
index 18f325a9..acd59c34 100644
--- a/src/imports/location/location.cpp
+++ b/src/imports/location/location.cpp
@@ -93,8 +93,6 @@
#include "qdeclarativesearchresultmodel_p.h"
#include "qdeclarativetextpredictionmodel_p.h"
-#include "qdeclarativeplacemanager_p.h"
-
#include <QtDeclarative/qdeclarativeextensionplugin.h>
#include <QtDeclarative/qdeclarative.h>
#include <QDebug>
@@ -215,8 +213,6 @@ public:
qmlRegisterType<QDeclarativeSupportedCategoriesModel>(uri, 5, 0, "SupportedCategoriesModel");
qmlRegisterType<QDeclarativeSearchResultModel>(uri, 5, 0, "SearchResultModel");
qmlRegisterType<QDeclarativeTextPredictionModel>(uri, 5, 0, "TextPredictionModel");
-
- qmlRegisterType<QDeclarativePlaceManager>(uri, 5, 0, "PlaceManager");
} else {
qDebug() << "Unsupported URI given to load location QML plugin: " << QLatin1String(uri);
}
diff --git a/src/imports/location/qdeclarativegeoserviceprovider.cpp b/src/imports/location/qdeclarativegeoserviceprovider.cpp
index ca57a50f..b2f1204e 100644
--- a/src/imports/location/qdeclarativegeoserviceprovider.cpp
+++ b/src/imports/location/qdeclarativegeoserviceprovider.cpp
@@ -64,12 +64,9 @@ QT_BEGIN_NAMESPACE
*/
QDeclarativeGeoServiceProvider::QDeclarativeGeoServiceProvider(QObject *parent)
- : QObject(parent),
- supportsGeocoding_(false),
- supportsReverseGeocoding_(false),
- supportsRouting_(false),
- supportsMapping_(false),
- complete_(false)
+: QObject(parent), sharedProvider_(0), supportsGeocoding_(false),
+ supportsReverseGeocoding_(false), supportsRouting_(false), supportsMapping_(false),
+ supportsPlaces_(false), complete_(false)
{
}
@@ -127,6 +124,12 @@ void QDeclarativeGeoServiceProvider::updateSupportStatus()
setSupportsMapping(false);
else
setSupportsMapping(true);
+
+ QPlaceManager *placeManager = serviceProvider->placeManager();
+ if (!placeManager || serviceProvider->error() != QGeoServiceProvider::NoError)
+ setSupportsPlaces(false);
+ else
+ setSupportsPlaces(true);
}
QStringList QDeclarativeGeoServiceProvider::availableServiceProviders()
@@ -166,6 +169,14 @@ void QDeclarativeGeoServiceProvider::setSupportsMapping(bool supports)
emit supportsMappingChanged();
}
+void QDeclarativeGeoServiceProvider::setSupportsPlaces(bool supports)
+{
+ if (supports == supportsPlaces_)
+ return;
+ supportsPlaces_ = supports;
+ emit supportsPlacesChanged();
+}
+
void QDeclarativeGeoServiceProvider::componentComplete()
{
complete_ = true;
@@ -220,6 +231,16 @@ bool QDeclarativeGeoServiceProvider::supportsMapping() const
return supportsMapping_;
}
+/*!
+ \qmlproperty bool Plugin::supportsPlaces
+
+ This property holds whether plugin supports places.
+*/
+bool QDeclarativeGeoServiceProvider::supportsPlaces() const
+{
+ return supportsPlaces_;
+}
+
QGeoServiceProvider *QDeclarativeGeoServiceProvider::sharedGeoServiceProvider()
{
if (!sharedProvider_)
diff --git a/src/imports/location/qdeclarativegeoserviceprovider_p.h b/src/imports/location/qdeclarativegeoserviceprovider_p.h
index 50678542..04f1b41f 100644
--- a/src/imports/location/qdeclarativegeoserviceprovider_p.h
+++ b/src/imports/location/qdeclarativegeoserviceprovider_p.h
@@ -89,6 +89,7 @@ class QDeclarativeGeoServiceProvider : public QObject, public QDeclarativeParser
Q_PROPERTY(bool supportsReverseGeocoding READ supportsReverseGeocoding NOTIFY supportsReverseGeocodingChanged)
Q_PROPERTY(bool supportsRouting READ supportsRouting NOTIFY supportsRoutingChanged)
Q_PROPERTY(bool supportsMapping READ supportsMapping NOTIFY supportsMappingChanged)
+ Q_PROPERTY(bool supportsPlaces READ supportsPlaces NOTIFY supportsPlacesChanged)
Q_CLASSINFO("DefaultProperty", "parameters")
Q_INTERFACES(QDeclarativeParserStatus)
@@ -111,6 +112,7 @@ public:
bool supportsReverseGeocoding() const;
bool supportsRouting() const;
bool supportsMapping() const;
+ bool supportsPlaces() const;
QGeoServiceProvider *sharedGeoServiceProvider();
@@ -120,6 +122,7 @@ Q_SIGNALS:
void supportsReverseGeocodingChanged();
void supportsRoutingChanged();
void supportsMappingChanged();
+ void supportsPlacesChanged();
private:
static void parameter_append(QDeclarativeListProperty<QDeclarativeGeoServiceProviderParameter> *prop, QDeclarativeGeoServiceProviderParameter *mapObject);
@@ -131,6 +134,7 @@ private:
void setSupportsReverseGeocoding(bool supports);
void setSupportsRouting(bool supports);
void setSupportsMapping(bool supports);
+ void setSupportsPlaces(bool supports);
QGeoServiceProvider *sharedProvider_;
QString name_;
@@ -139,6 +143,7 @@ private:
bool supportsReverseGeocoding_;
bool supportsRouting_;
bool supportsMapping_;
+ bool supportsPlaces_;
bool complete_;
Q_DISABLE_COPY(QDeclarativeGeoServiceProvider)
};
diff --git a/src/location/maps/qgeoserviceprovider.cpp b/src/location/maps/qgeoserviceprovider.cpp
index fd175c22..360514ea 100644
--- a/src/location/maps/qgeoserviceprovider.cpp
+++ b/src/location/maps/qgeoserviceprovider.cpp
@@ -46,9 +46,11 @@
#include "qgeosearchmanager.h"
#include "qgeomappingmanager.h"
#include "qgeoroutingmanager.h"
+#include "qplacemanager.h"
#include "qgeosearchmanagerengine.h"
#include "qgeomappingmanagerengine.h"
#include "qgeoroutingmanagerengine.h"
+#include "qplacemanagerengine.h"
#include <QList>
#include <QString>
@@ -292,6 +294,52 @@ QGeoRoutingManager* QGeoServiceProvider::routingManager() const
}
/*!
+ Returns the QPlaceManager made available by the service provider.
+
+ This function will return 0 if the service provider does not provide
+ any place searching services.
+
+ This function will attempt to construct a QPlaceManager instance
+ when it is called for the first time. If the attempt is successful the
+ QPlaceManager will be cached, otherwise each call of this function
+ will attempt to construct a QPlace instance until the
+ construction is successful.
+
+ After this function has been called, error() and errorString() will
+ report any errors which occurred during the construction of the QPlaceManager.
+*/
+QPlaceManager *QGeoServiceProvider::placeManager() const
+{
+ if (!d_ptr->factory || (d_ptr->placeError != QGeoServiceProvider::NoError))
+ return 0;
+
+ if (!d_ptr->placeManager) {
+ QPlaceManagerEngine *engine = d_ptr->factory->createPlaceManagerEngine(d_ptr->parameterMap,
+ &(d_ptr->placeError),
+ &(d_ptr->placeErrorString));
+
+ if (engine) {
+ engine->setManagerName(d_ptr->factory->providerName());
+ engine->setManagerVersion(d_ptr->factory->providerVersion());
+ d_ptr->placeManager = new QPlaceManager(engine);
+ } else {
+ d_ptr->placeError = QGeoServiceProvider::NotSupportedError;
+ d_ptr->placeErrorString = QLatin1String("The service provider does not support placeManager().");
+ }
+
+ if (d_ptr->placeError != QGeoServiceProvider::NoError) {
+ if (d_ptr->placeManager)
+ delete d_ptr->placeManager;
+ d_ptr->placeManager = 0;
+ d_ptr->error = d_ptr->placeError;
+ d_ptr->errorString = d_ptr->placeErrorString;
+ }
+ }
+
+ return d_ptr->placeManager;
+}
+
+/*!
Returns an error code describing the error which occurred during the
last operation that was performed by this class.
*/
@@ -317,9 +365,11 @@ QGeoServiceProviderPrivate::QGeoServiceProviderPrivate()
searchManager(0),
routingManager(0),
mappingManager(0),
+ placeManager(0),
searchError(QGeoServiceProvider::NoError),
routingError(QGeoServiceProvider::NoError),
mappingError(QGeoServiceProvider::NoError),
+ placeError(QGeoServiceProvider::NoError),
error(QGeoServiceProvider::NoError) {}
QGeoServiceProviderPrivate::~QGeoServiceProviderPrivate()
@@ -332,6 +382,9 @@ QGeoServiceProviderPrivate::~QGeoServiceProviderPrivate()
if (mappingManager)
delete mappingManager;
+
+ if (placeManager)
+ delete placeManager;
}
void QGeoServiceProviderPrivate::loadPlugin(const QString &providerName, const QMap<QString, QVariant> &parameters)
diff --git a/src/location/maps/qgeoserviceprovider.h b/src/location/maps/qgeoserviceprovider.h
index 8fbe8ee6..ebda46c7 100644
--- a/src/location/maps/qgeoserviceprovider.h
+++ b/src/location/maps/qgeoserviceprovider.h
@@ -57,9 +57,11 @@ class QStringList;
class QGeoSearchManager;
class QGeoMappingManager;
class QGeoRoutingManager;
+class QPlaceManager;
class QGeoSearchManagerEngine;
class QGeoMappingManagerEngine;
class QGeoRoutingManagerEngine;
+class QPlaceManagerEngine;
class QGeoServiceProviderPrivate;
class Q_LOCATION_EXPORT QGeoServiceProvider
@@ -81,6 +83,7 @@ public:
QGeoSearchManager* searchManager() const;
QGeoMappingManager* mappingManager() const;
QGeoRoutingManager* routingManager() const;
+ QPlaceManager *placeManager() const;
Error error() const;
QString errorString() const;
diff --git a/src/location/maps/qgeoserviceprovider_p.h b/src/location/maps/qgeoserviceprovider_p.h
index 3d564481..bb194e09 100644
--- a/src/location/maps/qgeoserviceprovider_p.h
+++ b/src/location/maps/qgeoserviceprovider_p.h
@@ -80,14 +80,17 @@ public:
QGeoSearchManager *searchManager;
QGeoRoutingManager *routingManager;
QGeoMappingManager *mappingManager;
+ QPlaceManager *placeManager;
QGeoServiceProvider::Error searchError;
QGeoServiceProvider::Error routingError;
QGeoServiceProvider::Error mappingError;
+ QGeoServiceProvider::Error placeError;
QString searchErrorString;
QString routingErrorString;
QString mappingErrorString;
+ QString placeErrorString;
QGeoServiceProvider::Error error;
QString errorString;
diff --git a/src/location/maps/qgeoserviceproviderfactory.cpp b/src/location/maps/qgeoserviceproviderfactory.cpp
index 6c8fe013..196f6877 100644
--- a/src/location/maps/qgeoserviceproviderfactory.cpp
+++ b/src/location/maps/qgeoserviceproviderfactory.cpp
@@ -160,4 +160,29 @@ QGeoRoutingManagerEngine* QGeoServiceProviderFactory::createRoutingManagerEngine
return 0;
}
+/*!
+ Returns a new QPlaceManagerEngine instance, initialized with \a
+ parameters, which implements the place searching functionality.
+
+ If \a error is not 0 it should be set to QGeoServiceProvider::NoError on
+ success or an appropriate QGeoServiceProvider::Error on failure.
+
+ If \a errorString is not 0 it should be set to a string describing any
+ error which occurred.
+
+ The default implementation returns 0, which causes a
+ QGeoServiceProvider::NotSupportedError in QGeoServiceProvider.
+*/
+QPlaceManagerEngine* QGeoServiceProviderFactory::createPlaceManagerEngine(const QMap<QString, QVariant> &parameters,
+ QGeoServiceProvider::Error *error,
+ QString *errorString) const
+
+{
+ Q_UNUSED(parameters)
+ Q_UNUSED(error)
+ Q_UNUSED(errorString)
+
+ return 0;
+}
+
QT_END_NAMESPACE
diff --git a/src/location/maps/qgeoserviceproviderfactory.h b/src/location/maps/qgeoserviceproviderfactory.h
index 1e457d7f..d8a80dd4 100644
--- a/src/location/maps/qgeoserviceproviderfactory.h
+++ b/src/location/maps/qgeoserviceproviderfactory.h
@@ -68,6 +68,9 @@ public:
virtual QGeoRoutingManagerEngine* createRoutingManagerEngine(const QMap<QString, QVariant> &parameters,
QGeoServiceProvider::Error *error,
QString *errorString) const;
+ virtual QPlaceManagerEngine *createPlaceManagerEngine(const QMap<QString, QVariant> &parameters,
+ QGeoServiceProvider::Error *error,
+ QString *errorString) const;
};
QT_END_NAMESPACE
diff --git a/src/location/places/places.pri b/src/location/places/places.pri
index 121dff31..1adb463e 100644
--- a/src/location/places/places.pri
+++ b/src/location/places/places.pri
@@ -46,7 +46,8 @@ PRIVATE_HEADERS += \
places/qplaceweekdayhours_p.h \
places/qplacesearchresult_p.h \
places/qplacereply_p.h \
- places/qplacemanager_p.h
+ places/qplacemanager_p.h \
+ places/qplacemanagerengine_p.h
SOURCES += \
#data classes
diff --git a/src/location/places/qplacemanager.cpp b/src/location/places/qplacemanager.cpp
index d9266293..b53ea641 100644
--- a/src/location/places/qplacemanager.cpp
+++ b/src/location/places/qplacemanager.cpp
@@ -95,11 +95,19 @@
users should acquire instances of QGeoRoutingManager with
QGeoServiceProvider::routingManager();
*/
-QPlaceManager::QPlaceManager(QObject *parent)
- : QObject(parent),d(new QPlaceManagerPrivate)
+QPlaceManager::QPlaceManager(QPlaceManagerEngine *engine, QObject *parent)
+ : QObject(parent), d(new QPlaceManagerPrivate)
{
- d->q_ptr = this;
- d->createEngine(QLatin1String("nokia"));
+ d->engine = engine;
+ if (d->engine) {
+ d->engine->setParent(this);
+
+ connect(d->engine, SIGNAL(finished(QPlaceReply*)), this, SIGNAL(finished(QPlaceReply*)));
+ connect(d->engine, SIGNAL(error(QPlaceReply*,QPlaceReply::Error)),
+ this, SIGNAL(error(QPlaceReply*,QPlaceReply::Error)));
+ } else {
+ qFatal("The place manager engine that was set for this place manager was NULL.");
+ }
}
/*!
@@ -137,9 +145,9 @@ QPlaceMediaReply *QPlaceManager::getMedia(const QGeoPlace &place, const QPlaceQu
/*!
Posts a \a rating to a \a place.
*/
-QPlaceReply* QPlaceManager::postRating(const QGeoPlace &place, qreal rating)
+QPlaceReply* QPlaceManager::postRating(const QString &placeId, qreal rating)
{
- return d->engine->postRating(place, rating);
+ return d->engine->postRating(placeId, rating);
}
/*!
diff --git a/src/location/places/qplacemanager.h b/src/location/places/qplacemanager.h
index a2198402..b856148b 100644
--- a/src/location/places/qplacemanager.h
+++ b/src/location/places/qplacemanager.h
@@ -100,12 +100,13 @@ public:
NotSupportedError
};
- QPlaceManager(QObject *parent = 0);
~QPlaceManager();
+
QString managerName() const;
+ int managerVersion() const;
QPlaceDetailsReply *getPlaceDetails(const QString &placeId) const;
- QPlaceReply *postRating(const QGeoPlace &place, qreal value);
+ QPlaceReply *postRating(const QString &placeId, qreal value);
QPlaceReviewReply *getReviews(const QGeoPlace &place, const QPlaceQuery &query) const;
@@ -138,9 +139,13 @@ Q_SIGNALS:
void error(QPlaceReply *, QPlaceReply::Error error, const QString &errorString = QString());
private:
+ QPlaceManager(QPlaceManagerEngine *engine, QObject *parent = 0);
+
Q_DISABLE_COPY(QPlaceManager)
QPlaceManagerPrivate* d;
Q_DECLARE_PRIVATE(QPlaceManager)
+
+ friend class QGeoServiceProvider;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QPlaceManager::VisibilityScopes);
diff --git a/src/location/places/qplacemanager_p.cpp b/src/location/places/qplacemanager_p.cpp
index 3410ac87..677a64ee 100644
--- a/src/location/places/qplacemanager_p.cpp
+++ b/src/location/places/qplacemanager_p.cpp
@@ -55,47 +55,10 @@
QT_USE_NAMESPACE
QPlaceManagerPrivate::QPlaceManagerPrivate()
- : engine(0),
- errorCode(QPlaceManager::NoError),
- isConnected(false),
- q_ptr(0)
+: engine(0), errorCode(QPlaceManager::NoError), isConnected(false)
{
}
-void QPlaceManagerPrivate::createEngine(const QString &managerName, const QMap<QString,QString> &parameters)
-{
- Q_Q(QPlaceManager);
-
- if (!q->availableManagers().contains(managerName)) {
- errorCode = QPlaceManager::NotSupportedError;
- errorString = QString::fromLatin1("The places manager, %1, was not found").arg(managerName);
- qWarning() << errorString;
- engine = 0;
- return;
- }
-
- QList<QPlaceManagerEngineFactory *> candidates = QPlaceManagerPrivate::factories().values(managerName);
-
- foreach (QPlaceManagerEngineFactory *f, candidates)
- {
- engine = f->engine(parameters, &errorCode, &errorString);
- if (engine)
- break;
- }
-
- if (!engine) {
- if (errorCode == QPlaceManager::NoError) {
- errorCode = QPlaceManager::NotSupportedError;
- errorString = QLatin1String("The place manager could not return the requested engine instance");
- }
- }
-
- // connect signals from engine to public class
- q_ptr->connect(engine, SIGNAL(finished(QPlaceReply*)), SIGNAL(finished(QPlaceReply*)));
- q_ptr->connect(engine, SIGNAL(error(QPlaceReply*,QPlaceReply::Error)),
- SIGNAL(error(QPlaceReply*,QPlaceReply::Error)));
-}
-
QPlaceManagerEngine* QPlaceManagerPrivate::getEngine(const QPlaceManager* manager)
{
if (manager)
diff --git a/src/location/places/qplacemanager_p.h b/src/location/places/qplacemanager_p.h
index a4fe5ed2..e140e454 100644
--- a/src/location/places/qplacemanager_p.h
+++ b/src/location/places/qplacemanager_p.h
@@ -68,7 +68,6 @@ class QPlaceManagerPrivate
{
public:
QPlaceManagerPrivate();
- void createEngine(const QString &managerName, const QMap<QString,QString> &parameters = (QMap<QString, QString>()));
QPlaceManagerEngine *engine;
mutable QPlaceManager::Error errorCode;
@@ -81,8 +80,8 @@ public:
static void loadStaticFactories (QHash<QString, QPlaceManagerEngineFactory*> *factories);
bool isConnected;//identifies whether connections have been made to the notification signals
- QPlaceManager *q_ptr;
- Q_DECLARE_PUBLIC(QPlaceManager)
+private:
+ Q_DISABLE_COPY(QPlaceManagerPrivate)
};
QT_END_NAMESPACE
diff --git a/src/location/places/qplacemanagerengine.cpp b/src/location/places/qplacemanagerengine.cpp
index 3c28ae44..f2ae288c 100644
--- a/src/location/places/qplacemanagerengine.cpp
+++ b/src/location/places/qplacemanagerengine.cpp
@@ -40,16 +40,112 @@
****************************************************************************/
#include "qplacemanagerengine.h"
+#include "qplacemanagerengine_p.h"
#include "qplacecategory_p.h"
QT_USE_NAMESPACE
-QPlaceManagerEngine::QPlaceManagerEngine(QObject *parent)
- : QObject(parent)
+/*!
+ \class QPlaceManagerEngine
+
+ \brief The QPlaceManagerEngine class provides an interface and convenience methods to
+ implementers of QGeoServiceProvider plugins who want to provide access to place search
+ functionality.
+
+ \inmodule QtLocation
+ \since 5.0
+
+ \ingroup maps-impl
+
+ Subclasses of QPlaceManagerEngine need to provide an implementation of getPlaceDetails(),
+ getMedia(), postRating(), getReviews(), searchForPlaces(), supportedSearchVisibilityScopes(),
+ recommendations(), textPredictions(), connectivityMode(), setConnectivityMode(),
+ supportedConnectivityModes(), savePlace(), supportedSaveVisibilityScopes(), removePlace(),
+ initializeCategories() and categories().
+
+ \sa QPlaceManager
+*/
+
+/*!
+ Constructs a new engine with the specified \a parent, using \a parameters to pass any
+ implementation specific data to the engine.
+*/
+QPlaceManagerEngine::QPlaceManagerEngine(const QMap<QString, QVariant> &parameters,
+ QObject *parent)
+: QObject(parent), d_ptr(new QPlaceManagerEnginePrivate)
{
+ Q_UNUSED(parameters)
}
+/*!
+ Destroys this engine.
+*/
QPlaceManagerEngine::~QPlaceManagerEngine()
{
+ delete d_ptr;
+}
+
+/*!
+ Sets the name which this engine implementation uses to distinguish itself
+ from the implementations provided by other plugins to \a managerName.
+
+ The combination of managerName() and managerVersion() should be unique
+ amongst plugin implementations.
+*/
+void QPlaceManagerEngine::setManagerName(const QString &managerName)
+{
+ d_ptr->managerName = managerName;
+}
+
+/*!
+ Returns the name which this engine implementation uses to distinguish
+ itself from the implementations provided by other plugins.
+
+ The combination of managerName() and managerVersion() should be unique
+ amongst plugin implementations.
+*/
+QString QPlaceManagerEngine::managerName() const
+{
+ return d_ptr->managerName;
+}
+
+/*!
+ Sets the version of this engine implementation to \a managerVersion.
+
+ The combination of managerName() and managerVersion() should be unique
+ amongst plugin implementations.
+*/
+void QPlaceManagerEngine::setManagerVersion(int managerVersion)
+{
+ d_ptr->managerVersion = managerVersion;
}
+
+/*!
+ Returns the version of this engine implementation.
+
+ The combination of managerName() and managerVersion() should be unique
+ amongst plugin implementations.
+*/
+int QPlaceManagerEngine::managerVersion() const
+{
+ return d_ptr->managerVersion;
+}
+
+
+
+
+
+QPlaceManagerEnginePrivate::QPlaceManagerEnginePrivate()
+: managerVersion(-1)
+{
+}
+
+QPlaceManagerEnginePrivate::~QPlaceManagerEnginePrivate()
+{
+}
+
+#include "moc_qplacemanagerengine.cpp"
+
+QT_END_NAMESPACE
+
diff --git a/src/location/places/qplacemanagerengine.h b/src/location/places/qplacemanagerengine.h
index 4d6536b6..a436b4d8 100644
--- a/src/location/places/qplacemanagerengine.h
+++ b/src/location/places/qplacemanagerengine.h
@@ -46,21 +46,24 @@
QT_BEGIN_NAMESPACE
+class QPlaceManagerEnginePrivate;
+
class Q_LOCATION_EXPORT QPlaceManagerEngine : public QObject
{
Q_OBJECT
public:
- QPlaceManagerEngine(QObject *parent = 0);
+ QPlaceManagerEngine(const QMap<QString, QVariant> &parameters, QObject *parent = 0);
virtual ~QPlaceManagerEngine();
- virtual QString managerName() const = 0;
+ QString managerName() const;
+ int managerVersion() const;
virtual QPlaceDetailsReply *getPlaceDetails(const QString &placeId) = 0;
virtual QPlaceMediaReply *getMedia(const QGeoPlace &place, const QPlaceQuery &query) = 0;
- virtual QPlaceReply *postRating(const QGeoPlace &place, qreal value) = 0;
+ virtual QPlaceReply *postRating(const QString &placeId, qreal value) = 0;
virtual QPlaceReviewReply *getReviews(const QGeoPlace &place, const QPlaceQuery &query) = 0;
@@ -86,6 +89,14 @@ Q_SIGNALS:
void finished(QPlaceReply *reply);
void error(QPlaceReply *, QPlaceReply::Error error, QString errorString = QString());
+private:
+ void setManagerName(const QString &managerName);
+ void setManagerVersion(int managerVersion);
+
+ QPlaceManagerEnginePrivate *d_ptr;
+ Q_DISABLE_COPY(QPlaceManagerEngine)
+
+ friend class QGeoServiceProvider;
};
QT_END_NAMESPACE
diff --git a/src/plugins/places/nokia/placemanagerenginefactory_nokia.h b/src/location/places/qplacemanagerengine_p.h
index cf7a3a8b..ded52b38 100644
--- a/src/plugins/places/nokia/placemanagerenginefactory_nokia.h
+++ b/src/location/places/qplacemanagerengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -37,35 +37,39 @@
**
** $QT_END_LICENSE$
**
-** This file is part of the Ovi services plugin for the Maps and
-** Navigation API. The use of these services, whether by use of the
-** plugin or by other means, is governed by the terms and conditions
-** described by the file OVI_SERVICES_TERMS_AND_CONDITIONS.txt in
-** this package, located in the directory containing the Ovi services
-** plugin source code.
-**
****************************************************************************/
-#ifndef PLACEMANAGERENGINEFACTORY_NOKIA_H
-#define PLACEMANAGERENGINEFACTORY_NOKIA_H
+#ifndef QPLACEMANAGERENGINE_P_H
+#define QPLACEMANAGERENGINE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
-#include <qplacemanagerenginefactory.h>
-#include <QObject>
+#include <QtCore/QString>
-QT_USE_NAMESPACE
+QT_BEGIN_NAMESPACE
-class PlaceManagerEngineFactoryNokia : public QObject, public QPlaceManagerEngineFactory
+class QPlaceManagerEnginePrivate
{
- Q_OBJECT
- Q_INTERFACES(QPlaceManagerEngineFactory)
public:
- PlaceManagerEngineFactoryNokia();
- ~PlaceManagerEngineFactoryNokia();
+ QPlaceManagerEnginePrivate();
+ ~QPlaceManagerEnginePrivate();
- QString managerName() const;
+ QString managerName;
+ int managerVersion;
- QPlaceManagerEngine* engine(const QMap<QString, QString> &parameters,
- QPlaceManager::Error *error, QString *errorString);
+private:
+ Q_DISABLE_COPY(QPlaceManagerEnginePrivate)
};
-#endif
+QT_END_NAMESPACE
+
+#endif // QPLACEMANAGERENGINE_P_H
diff --git a/src/plugins/geoservices/nokia/nokia.pro b/src/plugins/geoservices/nokia/nokia.pro
index 062f2760..4ed75df4 100644
--- a/src/plugins/geoservices/nokia/nokia.pro
+++ b/src/plugins/geoservices/nokia/nokia.pro
@@ -33,6 +33,8 @@ SOURCES += \
qgeoserviceproviderplugin_nokia.cpp \
qgeotiledmapdata_nokia.cpp
+include(places/places.pri)
+
RESOURCES += resource.qrc
INCLUDEPATH += $$QT.location.includes
diff --git a/src/plugins/geoservices/nokia/places/places.pri b/src/plugins/geoservices/nokia/places/places.pri
new file mode 100644
index 00000000..b24b5f90
--- /dev/null
+++ b/src/plugins/geoservices/nokia/places/places.pri
@@ -0,0 +1,59 @@
+QT *= location network script
+
+HEADERS += \
+#data classes
+#parsers
+ places/qplacejsonparser_p.h \
+ places/qplacejsoncategoriesparser.h \
+ places/qplacejsondetailsparser.h \
+ places/qplacejsonmediaparser.h \
+ places/qplacejsonrecommendationparser.h \
+ places/qplacejsonreviewparser.h \
+ places/qplacejsonsearchparser.h \
+ places/qplacejsontextpredictionparser.h \
+#query classes
+#reply classes
+ places/qplacecategoriesreplyimpl.h \
+ places/qplacemediareplyimpl.h \
+ places/qplacedetailsreplyimpl.h \
+ places/qplaceratingreplyimpl.h \
+ places/qplacerecommendationreplyimpl.h \
+ places/qplacereviewreplyimpl.h \
+ places/qplacesearchreplyimpl.h \
+ places/qplacetextpredictionreplyimpl.h \
+#manager and engine
+ qplacemanagerengine_nokia.h \
+ places/qplacecategoriesrepository.h \
+ places/qplacerestreply.h \
+ places/qplacerestmanager.h \
+ places/qplacesuppliersrepository.h
+
+SOURCES += \
+#data classes
+#parsers
+ places/qplacejsonparser.cpp \
+ places/qplacejsoncategoriesparser.cpp \
+ places/qplacejsondetailsparser.cpp \
+ places/qplacejsonmediaparser.cpp \
+ places/qplacejsonrecommendationparser.cpp \
+ places/qplacejsonreviewparser.cpp \
+ places/qplacejsonsearchparser.cpp \
+ places/qplacejsontextpredictionparser.cpp \
+#query classes
+#reply classes
+ places/qplacecategoriesreplyimpl.cpp \
+ places/qplacedetailsreplyimpl.cpp \
+ places/qplacemediareplyimpl.cpp \
+ places/qplaceratingreplyimpl.cpp \
+ places/qplacerecommendationreplyimpl.cpp \
+ places/qplacereviewreplyimpl.cpp \
+ places/qplacesearchreplyimpl.cpp \
+ places/qplacetextpredictionreplyimpl.cpp \
+#manager and engine
+ qplacemanagerengine_nokia.cpp \
+ places/qplacecategoriesrepository.cpp \
+ places/qplacerestreply.cpp \
+ places/qplacerestmanager.cpp \
+ places/qplacesuppliersrepository.cpp
+
+
diff --git a/src/plugins/places/nokia/qplacecategoriesreplyimpl.cpp b/src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.cpp
index e312813e..e312813e 100644
--- a/src/plugins/places/nokia/qplacecategoriesreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.cpp
diff --git a/src/plugins/places/nokia/qplacecategoriesreplyimpl.h b/src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.h
index 51a0c16d..51a0c16d 100644
--- a/src/plugins/places/nokia/qplacecategoriesreplyimpl.h
+++ b/src/plugins/geoservices/nokia/places/qplacecategoriesreplyimpl.h
diff --git a/src/plugins/places/nokia/qplacecategoriesrepository.cpp b/src/plugins/geoservices/nokia/places/qplacecategoriesrepository.cpp
index 4304f3c0..4304f3c0 100644
--- a/src/plugins/places/nokia/qplacecategoriesrepository.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacecategoriesrepository.cpp
diff --git a/src/plugins/places/nokia/qplacecategoriesrepository.h b/src/plugins/geoservices/nokia/places/qplacecategoriesrepository.h
index e0a14725..e0a14725 100644
--- a/src/plugins/places/nokia/qplacecategoriesrepository.h
+++ b/src/plugins/geoservices/nokia/places/qplacecategoriesrepository.h
diff --git a/src/plugins/places/nokia/qplacedetailsreplyimpl.cpp b/src/plugins/geoservices/nokia/places/qplacedetailsreplyimpl.cpp
index 06a6e228..06a6e228 100644
--- a/src/plugins/places/nokia/qplacedetailsreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacedetailsreplyimpl.cpp
diff --git a/src/plugins/places/nokia/qplacedetailsreplyimpl.h b/src/plugins/geoservices/nokia/places/qplacedetailsreplyimpl.h
index e08233e9..e08233e9 100644
--- a/src/plugins/places/nokia/qplacedetailsreplyimpl.h
+++ b/src/plugins/geoservices/nokia/places/qplacedetailsreplyimpl.h
diff --git a/src/plugins/places/nokia/qplacejsoncategoriesparser.cpp b/src/plugins/geoservices/nokia/places/qplacejsoncategoriesparser.cpp
index 18e875a9..18e875a9 100644
--- a/src/plugins/places/nokia/qplacejsoncategoriesparser.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacejsoncategoriesparser.cpp
diff --git a/src/plugins/places/nokia/qplacejsoncategoriesparser.h b/src/plugins/geoservices/nokia/places/qplacejsoncategoriesparser.h
index c6c95717..c6c95717 100644
--- a/src/plugins/places/nokia/qplacejsoncategoriesparser.h
+++ b/src/plugins/geoservices/nokia/places/qplacejsoncategoriesparser.h
diff --git a/src/plugins/places/nokia/qplacejsondetailsparser.cpp b/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp
index 6995c635..6995c635 100644
--- a/src/plugins/places/nokia/qplacejsondetailsparser.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp
diff --git a/src/plugins/places/nokia/qplacejsondetailsparser.h b/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.h
index 8c255827..8c255827 100644
--- a/src/plugins/places/nokia/qplacejsondetailsparser.h
+++ b/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.h
diff --git a/src/plugins/places/nokia/qplacejsonmediaparser.cpp b/src/plugins/geoservices/nokia/places/qplacejsonmediaparser.cpp
index 7931ec4e..7931ec4e 100644
--- a/src/plugins/places/nokia/qplacejsonmediaparser.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacejsonmediaparser.cpp
diff --git a/src/plugins/places/nokia/qplacejsonmediaparser.h b/src/plugins/geoservices/nokia/places/qplacejsonmediaparser.h
index 28265994..28265994 100644
--- a/src/plugins/places/nokia/qplacejsonmediaparser.h
+++ b/src/plugins/geoservices/nokia/places/qplacejsonmediaparser.h
diff --git a/src/plugins/places/nokia/qplacejsonparser.cpp b/src/plugins/geoservices/nokia/places/qplacejsonparser.cpp
index c23a4d67..c23a4d67 100644
--- a/src/plugins/places/nokia/qplacejsonparser.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacejsonparser.cpp
diff --git a/src/plugins/places/nokia/qplacejsonparser_p.h b/src/plugins/geoservices/nokia/places/qplacejsonparser_p.h
index 5daa22f0..5daa22f0 100644
--- a/src/plugins/places/nokia/qplacejsonparser_p.h
+++ b/src/plugins/geoservices/nokia/places/qplacejsonparser_p.h
diff --git a/src/plugins/places/nokia/qplacejsonrecommendationparser.cpp b/src/plugins/geoservices/nokia/places/qplacejsonrecommendationparser.cpp
index c596fe59..c596fe59 100644
--- a/src/plugins/places/nokia/qplacejsonrecommendationparser.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacejsonrecommendationparser.cpp
diff --git a/src/plugins/places/nokia/qplacejsonrecommendationparser.h b/src/plugins/geoservices/nokia/places/qplacejsonrecommendationparser.h
index 09f6d783..09f6d783 100644
--- a/src/plugins/places/nokia/qplacejsonrecommendationparser.h
+++ b/src/plugins/geoservices/nokia/places/qplacejsonrecommendationparser.h
diff --git a/src/plugins/places/nokia/qplacejsonreviewparser.cpp b/src/plugins/geoservices/nokia/places/qplacejsonreviewparser.cpp
index 447536a8..447536a8 100644
--- a/src/plugins/places/nokia/qplacejsonreviewparser.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacejsonreviewparser.cpp
diff --git a/src/plugins/places/nokia/qplacejsonreviewparser.h b/src/plugins/geoservices/nokia/places/qplacejsonreviewparser.h
index a72dac1b..a72dac1b 100644
--- a/src/plugins/places/nokia/qplacejsonreviewparser.h
+++ b/src/plugins/geoservices/nokia/places/qplacejsonreviewparser.h
diff --git a/src/plugins/places/nokia/qplacejsonsearchparser.cpp b/src/plugins/geoservices/nokia/places/qplacejsonsearchparser.cpp
index 8e821b03..8e821b03 100644
--- a/src/plugins/places/nokia/qplacejsonsearchparser.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacejsonsearchparser.cpp
diff --git a/src/plugins/places/nokia/qplacejsonsearchparser.h b/src/plugins/geoservices/nokia/places/qplacejsonsearchparser.h
index 866c49eb..866c49eb 100644
--- a/src/plugins/places/nokia/qplacejsonsearchparser.h
+++ b/src/plugins/geoservices/nokia/places/qplacejsonsearchparser.h
diff --git a/src/plugins/places/nokia/qplacejsontextpredictionparser.cpp b/src/plugins/geoservices/nokia/places/qplacejsontextpredictionparser.cpp
index 1b4e64b4..1b4e64b4 100644
--- a/src/plugins/places/nokia/qplacejsontextpredictionparser.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacejsontextpredictionparser.cpp
diff --git a/src/plugins/places/nokia/qplacejsontextpredictionparser.h b/src/plugins/geoservices/nokia/places/qplacejsontextpredictionparser.h
index d12b087a..d12b087a 100644
--- a/src/plugins/places/nokia/qplacejsontextpredictionparser.h
+++ b/src/plugins/geoservices/nokia/places/qplacejsontextpredictionparser.h
diff --git a/src/plugins/places/nokia/qplacemediareplyimpl.cpp b/src/plugins/geoservices/nokia/places/qplacemediareplyimpl.cpp
index 4a179e39..4a179e39 100644
--- a/src/plugins/places/nokia/qplacemediareplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacemediareplyimpl.cpp
diff --git a/src/plugins/places/nokia/qplacemediareplyimpl.h b/src/plugins/geoservices/nokia/places/qplacemediareplyimpl.h
index 80b78bc2..80b78bc2 100644
--- a/src/plugins/places/nokia/qplacemediareplyimpl.h
+++ b/src/plugins/geoservices/nokia/places/qplacemediareplyimpl.h
diff --git a/src/plugins/places/nokia/qplaceratingreplyimpl.cpp b/src/plugins/geoservices/nokia/places/qplaceratingreplyimpl.cpp
index 5e479e43..5e479e43 100644
--- a/src/plugins/places/nokia/qplaceratingreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/places/qplaceratingreplyimpl.cpp
diff --git a/src/plugins/places/nokia/qplaceratingreplyimpl.h b/src/plugins/geoservices/nokia/places/qplaceratingreplyimpl.h
index b9e9b080..b9e9b080 100644
--- a/src/plugins/places/nokia/qplaceratingreplyimpl.h
+++ b/src/plugins/geoservices/nokia/places/qplaceratingreplyimpl.h
diff --git a/src/plugins/places/nokia/qplacerecommendationreplyimpl.cpp b/src/plugins/geoservices/nokia/places/qplacerecommendationreplyimpl.cpp
index 0873f640..0873f640 100644
--- a/src/plugins/places/nokia/qplacerecommendationreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacerecommendationreplyimpl.cpp
diff --git a/src/plugins/places/nokia/qplacerecommendationreplyimpl.h b/src/plugins/geoservices/nokia/places/qplacerecommendationreplyimpl.h
index ff689769..ff689769 100644
--- a/src/plugins/places/nokia/qplacerecommendationreplyimpl.h
+++ b/src/plugins/geoservices/nokia/places/qplacerecommendationreplyimpl.h
diff --git a/src/plugins/places/nokia/qplacerestmanager.cpp b/src/plugins/geoservices/nokia/places/qplacerestmanager.cpp
index 35fd4129..35fd4129 100644
--- a/src/plugins/places/nokia/qplacerestmanager.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacerestmanager.cpp
diff --git a/src/plugins/places/nokia/qplacerestmanager.h b/src/plugins/geoservices/nokia/places/qplacerestmanager.h
index b86d0473..b86d0473 100644
--- a/src/plugins/places/nokia/qplacerestmanager.h
+++ b/src/plugins/geoservices/nokia/places/qplacerestmanager.h
diff --git a/src/plugins/places/nokia/qplacerestreply.cpp b/src/plugins/geoservices/nokia/places/qplacerestreply.cpp
index f08e57f4..f08e57f4 100644
--- a/src/plugins/places/nokia/qplacerestreply.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacerestreply.cpp
diff --git a/src/plugins/places/nokia/qplacerestreply.h b/src/plugins/geoservices/nokia/places/qplacerestreply.h
index 9429583f..9429583f 100644
--- a/src/plugins/places/nokia/qplacerestreply.h
+++ b/src/plugins/geoservices/nokia/places/qplacerestreply.h
diff --git a/src/plugins/places/nokia/qplacereviewreplyimpl.cpp b/src/plugins/geoservices/nokia/places/qplacereviewreplyimpl.cpp
index ffeade55..ffeade55 100644
--- a/src/plugins/places/nokia/qplacereviewreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacereviewreplyimpl.cpp
diff --git a/src/plugins/places/nokia/qplacereviewreplyimpl.h b/src/plugins/geoservices/nokia/places/qplacereviewreplyimpl.h
index fd374074..fd374074 100644
--- a/src/plugins/places/nokia/qplacereviewreplyimpl.h
+++ b/src/plugins/geoservices/nokia/places/qplacereviewreplyimpl.h
diff --git a/src/plugins/places/nokia/qplacesearchreplyimpl.cpp b/src/plugins/geoservices/nokia/places/qplacesearchreplyimpl.cpp
index 43952055..43952055 100644
--- a/src/plugins/places/nokia/qplacesearchreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacesearchreplyimpl.cpp
diff --git a/src/plugins/places/nokia/qplacesearchreplyimpl.h b/src/plugins/geoservices/nokia/places/qplacesearchreplyimpl.h
index d55973f0..d55973f0 100644
--- a/src/plugins/places/nokia/qplacesearchreplyimpl.h
+++ b/src/plugins/geoservices/nokia/places/qplacesearchreplyimpl.h
diff --git a/src/plugins/places/nokia/qplacesuppliersrepository.cpp b/src/plugins/geoservices/nokia/places/qplacesuppliersrepository.cpp
index e60b7b4a..e60b7b4a 100644
--- a/src/plugins/places/nokia/qplacesuppliersrepository.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacesuppliersrepository.cpp
diff --git a/src/plugins/places/nokia/qplacesuppliersrepository.h b/src/plugins/geoservices/nokia/places/qplacesuppliersrepository.h
index 99d21bd8..99d21bd8 100644
--- a/src/plugins/places/nokia/qplacesuppliersrepository.h
+++ b/src/plugins/geoservices/nokia/places/qplacesuppliersrepository.h
diff --git a/src/plugins/places/nokia/qplacetextpredictionreplyimpl.cpp b/src/plugins/geoservices/nokia/places/qplacetextpredictionreplyimpl.cpp
index d4104701..d4104701 100644
--- a/src/plugins/places/nokia/qplacetextpredictionreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacetextpredictionreplyimpl.cpp
diff --git a/src/plugins/places/nokia/qplacetextpredictionreplyimpl.h b/src/plugins/geoservices/nokia/places/qplacetextpredictionreplyimpl.h
index bc660b02..bc660b02 100644
--- a/src/plugins/places/nokia/qplacetextpredictionreplyimpl.h
+++ b/src/plugins/geoservices/nokia/places/qplacetextpredictionreplyimpl.h
diff --git a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp
index ae6d9a1a..bd79ee8d 100644
--- a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp
@@ -51,6 +51,7 @@
#include "qgeosearchmanagerengine_nokia.h"
#include "qgeoroutingmanagerengine_nokia.h"
#include "qgeomappingmanagerengine_nokia.h"
+#include "qplacemanagerengine_nokia.h"
#include <QtPlugin>
#include <QNetworkProxy>
@@ -92,6 +93,13 @@ QGeoRoutingManagerEngine* QGeoServiceProviderFactoryNokia::createRoutingManagerE
return new QGeoRoutingManagerEngineNokia(parameters, error, errorString);
}
+QPlaceManagerEngine *QGeoServiceProviderFactoryNokia::createPlaceManagerEngine(const QMap<QString, QVariant> &parameters,
+ QGeoServiceProvider::Error *error,
+ QString *errorString) const
+{
+ return new QPlaceManagerEngineNokia(parameters, error, errorString);
+}
+
const QString QGeoServiceProviderFactoryNokia::defaultToken("152022572f0e44e07489c35cd46fa246");
const QString QGeoServiceProviderFactoryNokia::defaultReferer("qtlocationapi");
diff --git a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.h b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.h
index 0013f40d..97496fdf 100644
--- a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.h
+++ b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.h
@@ -74,6 +74,9 @@ public:
QGeoRoutingManagerEngine* createRoutingManagerEngine(const QMap<QString, QVariant> &parameters,
QGeoServiceProvider::Error *error,
QString *errorString) const;
+ QPlaceManagerEngine *createPlaceManagerEngine(const QMap<QString, QVariant> &parameters,
+ QGeoServiceProvider::Error *error,
+ QString *errorString) const;
static const QString defaultToken;
static const QString defaultReferer;
diff --git a/src/plugins/places/nokia/qplacemanagerengineimpl.cpp b/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.cpp
index c4408984..c7281adb 100644
--- a/src/plugins/places/nokia/qplacemanagerengineimpl.cpp
+++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.cpp
@@ -46,38 +46,38 @@
**
****************************************************************************/
-#include "qplacemanagerengineimpl.h"
+#include "qplacemanagerengine_nokia.h"
-#include "qplacecategoriesrepository.h"
-#include "qplacetextpredictionreplyimpl.h"
-#include "qplacesearchreplyimpl.h"
-#include "qplacereviewreplyimpl.h"
-#include "qplacemediareplyimpl.h"
-#include "qplacerecommendationreplyimpl.h"
-#include "qplacedetailsreplyimpl.h"
-#include "qplaceratingreplyimpl.h"
-#include "qplacerestmanager.h"
-#include "qplacerestreply.h"
+#include "places/qplacecategoriesrepository.h"
+#include "places/qplacetextpredictionreplyimpl.h"
+#include "places/qplacesearchreplyimpl.h"
+#include "places/qplacereviewreplyimpl.h"
+#include "places/qplacemediareplyimpl.h"
+#include "places/qplacerecommendationreplyimpl.h"
+#include "places/qplacedetailsreplyimpl.h"
+#include "places/qplaceratingreplyimpl.h"
+#include "places/qplacerestmanager.h"
+#include "places/qplacerestreply.h"
QT_USE_NAMESPACE
-const char *MANAGER_NAME = "com.nokia.places/0.9";
-
-QPlaceManagerEngineImpl::QPlaceManagerEngineImpl(QObject *parent)
- : QPlaceManagerEngine(parent)
+QPlaceManagerEngineNokia::QPlaceManagerEngineNokia(const QMap<QString, QVariant> &parameters,
+ QGeoServiceProvider::Error *error,
+ QString *errorString)
+: QPlaceManagerEngine(parameters)
{
-}
+ if (error)
+ *error = QGeoServiceProvider::NoError;
-QPlaceManagerEngineImpl::~QPlaceManagerEngineImpl()
-{
+ if (errorString)
+ errorString->clear();
}
-QString QPlaceManagerEngineImpl::managerName() const
+QPlaceManagerEngineNokia::~QPlaceManagerEngineNokia()
{
- return MANAGER_NAME;
}
-QPlaceDetailsReply *QPlaceManagerEngineImpl::getPlaceDetails(const QString &placeId)
+QPlaceDetailsReply *QPlaceManagerEngineNokia::getPlaceDetails(const QString &placeId)
{
QPlaceDetailsReplyImpl *reply = NULL;
QPlaceRestReply *restReply = QPlaceRestManager::instance()->sendPlaceRequest(placeId);
@@ -91,7 +91,7 @@ QPlaceDetailsReply *QPlaceManagerEngineImpl::getPlaceDetails(const QString &plac
return reply;
}
-QPlaceMediaReply *QPlaceManagerEngineImpl::getMedia(const QGeoPlace &place, const QPlaceQuery &query)
+QPlaceMediaReply *QPlaceManagerEngineNokia::getMedia(const QGeoPlace &place, const QPlaceQuery &query)
{
QPlaceMediaReplyImpl *reply = NULL;
QPlaceRestReply *restReply = QPlaceRestManager::instance()->sendPlaceImagesRequest(place.placeId(),
@@ -107,11 +107,11 @@ QPlaceMediaReply *QPlaceManagerEngineImpl::getMedia(const QGeoPlace &place, cons
return reply;
}
-QPlaceReply *QPlaceManagerEngineImpl::postRating(const QGeoPlace &place, qreal value)
+QPlaceReply *QPlaceManagerEngineNokia::postRating(const QString &placeId, qreal value)
{
QPlaceRatingReplyImpl *reply = NULL;
//TODO: need to post user name
- QPlaceRestReply *restReply = QPlaceRestManager::instance()->postRatingRequest(place.placeId(),
+ QPlaceRestReply *restReply = QPlaceRestManager::instance()->postRatingRequest(placeId,
QString(),
value);
if (restReply) {
@@ -124,7 +124,7 @@ QPlaceReply *QPlaceManagerEngineImpl::postRating(const QGeoPlace &place, qreal v
return reply;
}
-QPlaceReviewReply *QPlaceManagerEngineImpl::getReviews(const QGeoPlace &place, const QPlaceQuery &query)
+QPlaceReviewReply *QPlaceManagerEngineNokia::getReviews(const QGeoPlace &place, const QPlaceQuery &query)
{
QPlaceReviewReplyImpl *reply = NULL;
QPlaceRestReply *restReply = QPlaceRestManager::instance()->sendPlaceReviewRequest(place.placeId(),
@@ -140,7 +140,7 @@ QPlaceReviewReply *QPlaceManagerEngineImpl::getReviews(const QGeoPlace &place, c
return reply;
}
-QPlaceSearchReply *QPlaceManagerEngineImpl::searchForPlaces(const QPlaceSearchQuery &query, QPlaceManager::VisibilityScope scope)
+QPlaceSearchReply *QPlaceManagerEngineNokia::searchForPlaces(const QPlaceSearchQuery &query, QPlaceManager::VisibilityScope scope)
{
//TODO: handling of scope
QPlaceSearchReplyImpl *reply = NULL;
@@ -161,12 +161,12 @@ QPlaceSearchReply *QPlaceManagerEngineImpl::searchForPlaces(const QPlaceSearchQu
return reply;
}
-QPlaceManager::VisibilityScopes QPlaceManagerEngineImpl::supportedSearchVisibilityScopes() const
+QPlaceManager::VisibilityScopes QPlaceManagerEngineNokia::supportedSearchVisibilityScopes() const
{
return QPlaceManager::PublicScope;
}
-QPlaceSearchReply *QPlaceManagerEngineImpl::recommendations(const QGeoPlace &place, const QPlaceSearchQuery &query)
+QPlaceSearchReply *QPlaceManagerEngineNokia::recommendations(const QGeoPlace &place, const QPlaceSearchQuery &query)
{
QPlaceRecommendationReplyImpl *reply = NULL;
QPlaceSearchQuery newQuery = query;
@@ -182,7 +182,7 @@ QPlaceSearchReply *QPlaceManagerEngineImpl::recommendations(const QGeoPlace &pla
return reply;
}
-QPlaceTextPredictionReply *QPlaceManagerEngineImpl::textPredictions(const QPlaceSearchQuery &query)
+QPlaceTextPredictionReply *QPlaceManagerEngineNokia::textPredictions(const QPlaceSearchQuery &query)
{
QPlaceTextPredictionReplyImpl *reply = NULL;
QPlaceRestReply *restReply = QPlaceRestManager::instance()->sendSuggestionRequest(query);
@@ -196,37 +196,37 @@ QPlaceTextPredictionReply *QPlaceManagerEngineImpl::textPredictions(const QPlace
return reply;
}
-QPlaceManager::ConnectivityModes QPlaceManagerEngineImpl::connectivityMode() const
+QPlaceManager::ConnectivityModes QPlaceManagerEngineNokia::connectivityMode() const
{
return QPlaceManager::OnlineMode;
}
-void QPlaceManagerEngineImpl::setConnectivityMode(QPlaceManager::ConnectivityModes mode)
+void QPlaceManagerEngineNokia::setConnectivityMode(QPlaceManager::ConnectivityModes mode)
{
Q_UNUSED(mode)
// only QPlaceManager::OnlineMode is suppoerted
}
-QPlaceManager::ConnectivityModes QPlaceManagerEngineImpl::supportedConnectivityModes() const
+QPlaceManager::ConnectivityModes QPlaceManagerEngineNokia::supportedConnectivityModes() const
{
return QPlaceManager::OnlineMode;
}
-QPlaceReply *QPlaceManagerEngineImpl::savePlace(QGeoPlace *place, QPlaceManager::VisibilityScope scope) {
+QPlaceReply *QPlaceManagerEngineNokia::savePlace(QGeoPlace *place, QPlaceManager::VisibilityScope scope) {
//TODO: implementation
return NULL;
}
-QPlaceManager::VisibilityScopes QPlaceManagerEngineImpl::supportedSaveVisibilityScopes() const {
+QPlaceManager::VisibilityScopes QPlaceManagerEngineNokia::supportedSaveVisibilityScopes() const {
return QPlaceManager::NoScope;
}
-QPlaceReply *QPlaceManagerEngineImpl::removePlace(const QGeoPlace &place) {
+QPlaceReply *QPlaceManagerEngineNokia::removePlace(const QGeoPlace &place) {
//TODO: implementation
return NULL;
}
-QPlaceReply *QPlaceManagerEngineImpl::initializeCategories()
+QPlaceReply *QPlaceManagerEngineNokia::initializeCategories()
{
QPlaceReply *reply = QPlaceCategoriesRepository::instance()->initializeCategories();
if (reply) {
@@ -239,19 +239,19 @@ QPlaceReply *QPlaceManagerEngineImpl::initializeCategories()
return reply;
}
-QList<QPlaceCategory> QPlaceManagerEngineImpl::categories() const
+QList<QPlaceCategory> QPlaceManagerEngineNokia::categories() const
{
return QPlaceCategoriesRepository::instance()->categories();
}
-void QPlaceManagerEngineImpl::processingError(QPlaceReply *reply,
+void QPlaceManagerEngineNokia::processingError(QPlaceReply *reply,
const QPlaceReply::Error &errorId,
const QString &errorMessage)
{
emit error(reply, errorId, errorMessage);
}
-void QPlaceManagerEngineImpl::processingFinished(QPlaceReply *reply)
+void QPlaceManagerEngineNokia::processingFinished(QPlaceReply *reply)
{
emit finished(reply);
}
diff --git a/src/plugins/places/nokia/qplacemanagerengineimpl.h b/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.h
index cc1abf0e..691eff02 100644
--- a/src/plugins/places/nokia/qplacemanagerengineimpl.h
+++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokia.h
@@ -46,28 +46,29 @@
**
****************************************************************************/
-#ifndef QPLACEMANAGERENGINEIMPL_H
-#define QPLACEMANAGERENGINEIMPL_H
+#ifndef QPLACEMANAGERENGINE_NOKIA_H
+#define QPLACEMANAGERENGINE_NOKIA_H
#include <qplacemanagerengine.h>
+#include <qgeoserviceprovider.h>
QT_BEGIN_NAMESPACE
-class QPlaceManagerEngineImpl : public QPlaceManagerEngine
+class QPlaceManagerEngineNokia : public QPlaceManagerEngine
{
Q_OBJECT
public:
- QPlaceManagerEngineImpl(QObject *parent = 0);
- ~QPlaceManagerEngineImpl();
-
- QString managerName() const;
+ QPlaceManagerEngineNokia(const QMap<QString, QVariant> &parameters,
+ QGeoServiceProvider::Error *error,
+ QString *errorString);
+ ~QPlaceManagerEngineNokia();
QPlaceDetailsReply *getPlaceDetails(const QString &placeId);
QPlaceMediaReply *getMedia(const QGeoPlace &place, const QPlaceQuery &query);
- QPlaceReply *postRating(const QGeoPlace &place, qreal value);
+ QPlaceReply *postRating(const QString &placeId, qreal value);
QPlaceReviewReply *getReviews(const QGeoPlace &place, const QPlaceQuery &query);
diff --git a/src/plugins/places/nokia/OVI_SERVICES_TERMS_AND_CONDITIONS.txt b/src/plugins/places/nokia/OVI_SERVICES_TERMS_AND_CONDITIONS.txt
deleted file mode 100644
index 8a63dd6a..00000000
--- a/src/plugins/places/nokia/OVI_SERVICES_TERMS_AND_CONDITIONS.txt
+++ /dev/null
@@ -1,315 +0,0 @@
-NOKIA DEVELOPER SOFTWARE AGREEMENT 2.1
-
-FOR THE NOKIA MAPS PLUG-IN TO Qt MOBILITY
-
-
-Please read this Nokia Developer Software Agreement carefully before accessing, downloading or using any part ofthe Nokia Maps Plug-In to Qt Mobility. By accessing, downloading, installing, using or clicking on the "Accept" button while downloading, installing and/or using the Software, You agree to the terms and conditions of this Agreement.
-
-Please note that this Agreement is structured in two sections: (i) general terms that apply to most Nokia developer software distributions; and (ii) additional terms and conditions applicable to certain parts of the Software or related content, services, additions and extensions that are specific to the particular Software provided. Please ensure to review the entirety of the terms provided as important restrictions relevant to your use of the Software are often included as additional terms.
-
-GENERAL TERMS
-
-1. Acceptance
-
-This Nokia Developer Software Agreement (the “Agreement”) governs Your use of the Software (ase defined below) and these terms and conditions constitute an agreement between You (either an individual or an entity) and Nokia Corporation including its affiliates and suppliers (collectively “Nokia”) defining the rights and responsibilities of You and Nokia with respect to the Software.
-
-There may be additional terms and conditions specific to the particular Software provided or applicable to certain parts of the Software or related content, services, additions and extensions.
-
-You are not allowed to use the Software if You do not agree to these terms and conditions.
-
-2. Definitions
-
-“Application” means one or more software programs developed by You in compliance with the requirements set forth in this Agreement and documentation provided by Nokia, under Your own trademark or brand, including bug fixes, updates, upgrades and new versions of such software programs.
-
-“Authorized Users” means You and Your employees and contractors or, if You are an educational institution, Your faculty and staff, as applicable, who (a) each have a valid Forum Nokia account with Nokia, (b) have a demonstrable need to know or use the Software in order to develop and test Applications, and (c) to the extent such individuals will have access to Confidential Information, each have written and binding agreements with You to protect the unauthorized use and disclosure of such Confidential Information.
-
-“Software” means (i) the Nokia Maps Plug-In to the Qt Mobility software product (source code and/or object code as applicable), with the exception of Open Source Software (as defined below), documentation, sample code, simulators, tools, libraries, application programming interfaces (APIs), data, files, and materials hereby provided or made available by Nokia for use by You in connection with Your Application development, and includes any updates that may be provided or made available by Nokia.
-
-"Open Source Software" means any software, which is, as included in the Software, subject to a license terms and conditions currently listed at http://opensource.org/licenses/ or meeting the criteria listed at http://www.opensource.org/docs/definition.php or which is subject to any similar free or open source license terms. Open Source Software contained in the Software is licensed under the license terms accompanying such Open Source Software and not the terms of this Agreement.
-
- “You” or “Your” means the person(s) or entity using the Software or otherwise exercising rights under these Terms. If you are accepting these Terms on behalf of your company. organization or other entity, “You” or “Your” refers to your company, organization or other entity as well.
-
-3. Eligibility
-
-You must be legally competent to execute this Agreement. Thereby You must be of the legal age of majority in the jurisdiction in which You reside (at least 18 years of age in most countries) and have the right and authority to enter into this Agreement on Your own behalf, or if You are entering into this Agreement on behalf of Your company, organization or other entity, that You have the right and authority to legally bind Your company, organization or other entity to the terms and obligations of this Agreement.
-
-4. Registration and termination
-
-If registration is required, You agree to provide truthful and complete information when registering for the Software and to keep that information updated. Providing misleading information about Your identity is forbidden.
-
-You may terminate Your registration(s) if You no longer wish to use the Software. After termination, You may not access the Software. Nokia may terminate Your registration(s) or restrict Your access to certain parts of the Software or related services if there is an indication that You have breached this Agreement.
-
-You may terminate this Agreement at any time by permanently uninstalling and/or deleting, at Your own costs, the Software and any backup copies, and all related materials provided by Nokia and by ceasing to use the Software. All Your rights automatically and immediately terminate without notice from Nokia if You fail to comply with any provision of these Terms. In such an event, You must immediately uninstall and/or delete, at Your own cost, the Software, all backup copies, and all other related material provided by Nokia as well as stop using the Software.
-
-Nokia may, in its sole discretion, provide with updates to the Software from time to time. Nokia may also provide with updates that are considered as important or critical by Nokia, and in such case You may not continue using the previous version of the Software and the use of the previous version of the Software may be prevented without installation of the update. Any related services or features of the Software may not be available during maintenance breaks and other times. Nokia may also decide to discontinue the Software, related service or any part thereof in its sole discretion. In such case You will be provided a prior notification and Nokia may terminate the Agreement accordingly.
-
-5. Updates to the Terms
-
-Nokia reserves the right to modify or amend the terms and conditions of this Agreement at any time without prior notice. If the terms are changed in a material, adverse way, Nokia will provide a separate notice advising of such change. In order to continue using the Software, You must accept and agree to the new terms of this Agreement. If You do not agree to new terms, Your use of the Software will be suspended or terminated by Nokia.
-
-6. Use of the Software
-
-You hereby certify and agree that You will comply with the terms of this Agreement and You agree to monitor and be responsible for Your Authorized Users’ use of the Software and their compliance with the terms of this Agreement. You may not grant access to the Software for any other than Authorized Users.
-
-The Software is made accessible to You for the sole purpose of developing and testing Your Application(s). You may install, as applicable, a reasonable number of copies of the Software on computers owned or controlled by You to be used by You or Your Authorized Users during the term of this Agreement.
-
-As a condition to using the Software, You hereby agree that:
-
-(i) You will not use the Software in any manner or for any purpose that violates these Terms or any applicable law or regulation, including without limitation, any intellectual property or other proprietary rights, any right of any person, rights of privacy, or rights of personality;
-
-(ii) You will not distribute or post spam, unreasonably large files, chain letters, pyramid schemes, any malicious code, viruses or any other technologies or content that may harm the Software, other users, servers or network;
-
-(iii) You will not use the Software in connection with any unlawful, offensive, abusive, obscene, pornographic, harassing, libelous or otherwise inappropriate content or material;
-
-(iv) You will be solely responsible for all costs, expenses, losses and liabilities incurred, and activities undertaken by You and Authorized Users in connection with the Software, Your Applications and Your related development efforts; and
-
-(v) You will not remove or obscure any copyright or trademark notices or other similar notices or markings or legends from the Software;
-
-Notwithstanding anything to the contrary contained herein, You may not (a) reverse engineer, decompile, disassemble or otherwise attempt to discover the source code of the Software, except and only to the extent permitted by applicable mandatory law; (b) modify or create derivative works of the Software, except and only to the extent permitted by Nokia; or (c) distribute, communicate to the public, export, re-export, sublicense, rent, loan, lease, disclose, sell, market, commercialise, re-license, host, or otherwise transfer or make available to any third party (including without limitation any affiliates and subcontractors) the Software (or any portions thereof).
-
-Nothing in this Agreement or otherwise prevents Nokia from developing, distributing and/or making use of any application that is directly or indirectly competing with Your Application.
-
-7. Requirements for Your Applications
-
-Your Application developed using the Software, or any part thereof, must comply with the following criteria and requirements, as may be modified by Nokia from time to time:
-
-(i) Your Application will be developed and used in compliance with the these Terms or any applicable law or regulation, including without limitation, any intellectual property or other proprietary rights, any right of any person, rights of privacy, or rights of personality;
-
-(ii) Your Application will be developed in compliance with the documentation, technical guidelines and other requirements as Nokia may provide from time to time;
-
-(iii) Your Application does not and will not, to the best of Your knowledge, violate, misappropriate, or infringe any copyright, patent, trademark, trade secret, rights of privacy or other proprietary or legal right of any third party or of Nokia;
-
-(iv) Your Application must not contain nor transfer any viruses, files, code malware or any other malicious software programs that may harm or disrupt the normal operation of the device or network;
-
-(v) Your Application must identify the nature and provider (including contact details) of the application, function as promoted and not contain any false, fraudulent or misleading information or representations;
-
-(vi) You will clearly communicate to the users of Your Application(s) (e.g. in the Application UI) that the use of the Application(s) creates data traffic;
-
-(vii) You will provide users of the Application(s) with easy settings to disable notifications;
-
-(viii) You will not design or market the Application, or any part thereof, in connection with any internal business application the purpose of which is directly related to the operation of Your core business and where the users of such application are Your employees or contractors (e.g. fleet or asset management and tracking);
-
-(ix) You will not design or market the Application, or any part thereof, for use in or with systems, devices or products that are critical to health and/or security of other people and property (e.g. intended for surgical implant into the body or other applications intended to support or sustain life or for any aviation or nuclear reactor application) or any other application in which the software or its failure, malfunction or inadequacy could directly or indirectly cause or contribute to personal injury or death or significant property damage;
-
-(x) Your Application must not enable push notifications routed from other notification systems and servers provided by third parties;
-
-(xi) Your Application shall not send any push notifications without first obtaining user consent, (e.g. unsolicited messages, advertising, promotions, or direct marketing of any kind or for the purposes of phishing and spamming); and
-
-(xii) Your Application shall not send any messages for the purpose of phishing or spamming, or enable anonymous or prank phone calls or SMS/MMS messaging.
-
-8. Ownership and Intellectual Property Rights
-
-The Software and all rights, without limitation including title and intellectual property rights therein, are owned by Nokia and/or its licensors and affiliates and are protected by international treaty provisions and all other applicable national laws of the country in which it is being used. The structure, organization, and code of the Software are the valuable trade secrets and confidential information of Nokia and/or its licensors and affiliates.
-
-No right or license, express or implied, is granted to any part of the Software except as expressly set forth above. In addition, no licenses or immunities are granted to the combination of the Software with any other software or hardware not delivered by Nokia under this Agreement. Also, any and all licenses with respect to Nokia or third party patents (including essential patents) are specifically excluded from the scope of this Agreement, and those licenses need to be acquired separately from Nokia or the respective right holders, as the case may be.
-
-You and Your affiliates, as the case may be, covenant and agree not to bring suit before any court or administrative agency or otherwise assert any claim against Nokia or any of its affiliates, suppliers, licensees or customers based on any of Your patent or Your affiliate’s due to reproduction, development, use, manufacturing, marketing, selling, distribution, licensing, importing, sub-licensing or other disposal of the Software or implementations thereof.
-
-You and Your affiliates shall impose the obligation stated in clause above on any third party to whom You or Your affiliates may assign or transfer Your patents. This obligation is restricted to suits or other assertions based on such assigned or transferred patents.
-
-You shall be released from Your covenant and agreement not to sue under this section in relation to a particular beneficiary (but not in relation to any other beneficiary) in the following event: (i) You are first sued for patent infringement related to the Software by such other beneficiary who benefits from Your covenant and agreement as set forth herein; and (ii) the suit is based on Your infringement of such other beneficiary’s patent rights which if held by You would be subject to the covenant and agreement not to sue provided for above in this section.
-
-For the purposes of this section, patent means any patent, utility model and any divisional, re-exam, re-issue, continuation and continuation-in-part thereof as well as any corresponding application globally.
-
-9. Fees
-
-Your use of the Software may be or may become subject to charges. Nokia reserves the right to charge for the Software and to change its fees from time to time, at its discretion.
-
-10. Availability
-
-The Software may not be available in all countries and may be provided only in selected languages. The Software or some features may be network dependent, contact Your network service provider for more information.
-
-11. Support and maintenance
-
-Nokia has no obligation to furnish You with technical or other support unless separately agreed in writing between You and Nokia. In case of such support given by Nokia, You understand and agree that the support has been given on “as is” and “as available” basis and Nokia will have no obligations or liabilities related to such support.
-
-12. Feedback
-
-By submitting feedback (“Feedback”) to Nokia related to the Software, You acknowledge and agree that (1) Nokia may have similar development ideas to the Feedback; (2) Your Feedback does not contain confidential or proprietary information related to Your own activities or those of any third party; (3) Nokia is not under any obligation of confidentiality with respect to the Feedback; and (4) You are not entitled to any compensation of any kind from Nokia. You hereby grant Nokia a worldwide non-exclusive, sublicensable, assignable, fully paid up, royalty-free, perpetual and irrevocable license to use, reproduce, adapt, translate, exploit, copy, publicly perform, display, distribute, further develop and modify for any purpose such Feedback, and to prepare derivative works thereof, or incorporate such Feedback into other works as well as sublicense products and Software resulting from such works.
-
-13. Links to Third Party Sites and Services
-
-For Your easy accessibility Nokia may include links to sites and services on the Internet that are owned or operated by third parties and that are not part of the Software. Upon following a link to such a third-party site, You shall review and agree to that site's rules of use before using such site or service.
-
-You agree that Nokia has no control over the content of third-party sites and cannot assume any responsibility for services provided or material created or published by such sites. A link to a third-party site does not imply that Nokia endorses the site or the products or services referenced in the site.
-
-You agree that Nokia is neither responsible nor liable for any such links or any third party Internet site.
-
-14. Confidentiality
-
-You agree that all material and information in any form received from Nokia, including, but not limited to Software and its copies, as well as all translations of computer programs contained in the Software, Nokia's products, designs, business plans, business opportunities, finances, research, development, know-how, personnel, or third-party confidential information, will be considered and referred to collectively as "Confidential Information". Confidential Information, however, does not include: (a) information that Nokia makes generally available to the public; (b) information that You can demonstrate to have had rightfully in Your possession prior to disclosure to You by Nokia; (c) information that is independently developed by You without the use of any Confidential Information; or (d) information that You rightfully obtain from a third party who has been given the right to transfer or disclose it by Nokia. You agree to keep confidential and not to disclose, publish, or disseminate any Confidential Information to any third party. You further agree to take reasonable precautions to prevent any unauthorized use, disclosure, publication, or dissemination of Confidential Information. You agree not to use Confidential Information otherwise for Your own or any third party's benefit without the prior written approval of an authorized representative of Nokia in each instance.
-
-You further agree that despite of any other confidentiality agreements You may have between You and Nokia, Nokia will not be responsible for keeping confidential any information You provide to Nokia through the use of the Software or any related services. Neither Nokia nor any of its employees accept or consider unsolicited ideas, including but not limited to ideas for new advertising campaigns, new promotions, new products or technologies, processes, materials, marketing plans or new product names. If, despite the request that You not send us Your ideas and materials, You still send them, please understand that Nokia makes no assurances that Your ideas and materials will be treated as confidential or proprietary.
-
-The rights and obligations of this section 14 shall remain in force for five (5) years from the date of the disclosure of Confidential Information.
-
-15. No warranties
-
-YOU ACKNOWLEDGE THAT THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NEITHER NOKIA, ITS LICENSORS OR AFFILIATES, NOR THE COPYRIGHT HOLDERS MAKE ANY REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ACCURACY OF DOCUMENTATION AND SUPPORT MATERIAL, OR FITNESS FOR A PARTICULAR PURPOSE OR THAT SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS, OR OTHER RIGHTS. THERE IS NO WARRANTY BY NOKIA OR BY ANY OTHER PARTY THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE. YOU ASSUME ALL RESPONSIBILITY AND RISK FOR THE SELECTION OF THE SOFTWARE TO ACHIEVE YOUR INTENDED RESULTS AND FOR THE INSTALLATION, USE, AND RESULTS OBTAINED FROM IT.
-
-16. Indemnity
-
-You agree to defend and indemnify Nokia from and against all third party claims and all liabilities, assessments, losses, costs or damages resulting from or arising out of (i) Your breach of this Agreement, (ii) Your infringement or violation of any intellectual property, other rights or privacy of a third party, and (iii) misuse of the Software by a third party where such misuse was made available by Your failure to take reasonable measures to protect Your username and password against misuse.
-
-17. Limitation of liability
-
-TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL NOKIA, ITS EMPLOYEES,LICENSORS OR AFFILIATES BE LIABLE FOR ANY LOST PROFITS, REVENUE, SALES, DATA, OR COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SOFTWARE, PROPERTY DAMAGE, PERSONAL INJURY, INTERRUPTION OF BUSINESS, LOSS OF BUSINESS INFORMATION, OR FOR ANY SPECIAL, DIRECT, INDIRECT, INCIDENTAL, ECONOMIC, COVER, PUNITIVE, SPECIAL, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND WHETHER ARISING UNDER CONTRACT, TORT, NEGLIGENCE, OR OTHER THEORY OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE OR THE SOFTWARE, EVEN IF NOKIA OR ITS LICENSORS OR AFFILIATES ARE ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME COUNTRIES/STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF LIABILITY, BUT MAY ALLOW LIABILITY TO BE LIMITED, IN SUCH CASES, NOKIA, ITS EMPLOYEES OR LICENSORS OR AFFILIATES' LIABILITY SHALL BE LIMITED TO U.S. $50. Nothing contained in this Agreement shall prejudice the statutory rights of any party dealing as a consumer. Nothing contained in this Agreement limits Nokia's liability to you in the event of death or personal injury resulting from Nokia's negligence. Nokia is acting on behalf of its employees and licensors or affiliates for the purpose of disclaiming, excluding, and/or restricting obligations, warranties, and liability as provided in this Agreement, but in no other respects and for no other purpose.
-
-18. Export control
-
-You acknowledge that the Software may be subject to export control restrictions of various countries. You shall fully comply with all applicable export license restrictions and requirements as well as with all laws and regulations relating to the importation of the Software and/or Applications and shall procure all necessary governmental authorizations, including without limitation, all necessary licenses, approvals, permissions or consents, where necessary for the re-exportation of the Software or Applications.
-
-19. Government End Users
-
-A "U.S. Government End User" shall mean any agency or entity of the government of the United States. The following shall apply if You are a U.S. Government End User. The Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire the Software with only those rights set forth herein. The Software (including related documentation) is provided to U.S. Government End Users: (a) only as a commercial end item; and (b) only pursuant to this Agreement.
-
-20. Miscellaneous
-
-20.1 Notices
-
-All notices of the Software should be delivered to:
-
-Nokia Corporation
-P.O. Box 100
-FIN-00045 Nokia Group
-Finland
-
-20.2 Assignment
-
-You shall not be entitled to assign or transfer all or any of Your rights, benefits and obligations under this Agreement without the prior written consent of Nokia, which shall not be unreasonably withheld. Nokia shall be entitled to assign or transfer any of its rights, benefits or obligations under this Agreement on an unrestricted basis.
-
-20.3 Severability
-
-If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms.
-
-20.4 Privacy
-
-The Nokia Privacy Policy and any additional privacy supplements govern the use of Your personal data.
-
-20.5 Governing law and dispute resolution
-
-This Agreement is governed by the laws of Finland. All disputes arising from or relating to these Terms shall be settled by a single arbitrator appointed by the Central Chamber of Commerce of Finland. The arbitration procedure shall take place in Helsinki, Finland in the English language.
-
-20.6 Entire Agreement
-
-This is the entire agreement between Nokia and You relating to the Software, and it supersedes any prior representations, discussions, undertakings, end-user agreements, communications, or advertising relating to the Software.
-
-ADDITIONAL TERMS
-
-Location API Additional Terms
-
-In addition to the terms set forth in Nokia Software Development Agreement version 2.1, the Nokia Privacy Policy and following additional terms shall apply to Your use of the Nokia Maps Plug-In (“Plug-In”) that is delivered in conjunction with the Qt Mobility software package and Nokia’s related location-based services (“Service”). Please note that these terms and conditions do no apply to Your use of the location APIs included in Qt Mobility as such and only apply to the use of the Plug-In and Service
-
-
-1. Definitions
-
-“Nokia Maps Content” means the maps content available from Nokia from time to time for the purpose of being rendered on the Nokia Maps, including data provided by Nokia that originates from third parties.
-
-“Location API Service” means the service offered by Nokia that enables You to incorporate the Location API s For Developers, the Nokia Maps Content and the Places Content, as made available by Nokia from time to time, into Your Applications and to have end-users access and use it on such Applications.
-
-“Location API For Developers” means the software, as made available by Nokia from time to time that allows the rendering of Nokia Maps Content and Places Content within Applications. For clarity, the Location API For Developers may include software components that are downloaded and installed on the users’ mobile device(s) and/or JavaScript libraries that are invoked and downloaded by the Location API(s) and/or data retrieved from server based APIs, including but not limited to the Ovi Maps Rendering API. “Location API Developer Package” means the Location API(s), documentation and any and all other material made accessible to You by Nokia from time to time that enables You to incorporate the Location API For Developers into Your Applications and is designated by Nokia as being a part of the Location API Developer Package.
-
-“Location API(s)” means the interface information made accessible to You by Nokia from time to time that enables You to incorporate the Location API For Developers into Your Applications.
-
-Places Content” means the geo-location content, including rich content (e.g. descriptions, opening hours, reviews) available from Nokia, including data provided by Nokia that originates from third parties
-
-2. Service Offering, Registration and Termination
-
-The Service is made available under a variety of business models to suit Your needs which will form an integral part of your agreement with Nokia for the use of the Software. For information about the Service, please visit www.forumnokia.com/Maps/.
-
-If you do not register for the Service Your use of the Location API For Developers is limited to internal testing of your Application(s) that use the Location API(s) and the Service will automatically disable itself once the access quota for the Service has been exceeded.
-
-If you elect to register for the Service (https://api.forum.nokia.com/ovi-api), You will be provided with a token and/or developer key that will enable You to create Application(s) that use the Location API(s) and distribute such Application(s) under the terms of this Agreement. The number of requests submitted by your Application(s) to the Service may be subject to certain quota limitations as updated from time to time by Nokia.
-
-If You elect to register for the Service, You agree to provide truthful and complete information when registering for the Service and to keep that information updated. Providing misleading information about Your identity is forbidden. You are personally responsible for any use of the Location API Service. You agree to take due care in protecting Your Application using Location API, Your token and/or developer key against misuse by others and promptly notify Nokia about any misuse. Where requested by Nokia, You agree to include and use the token and/or developer key, as applicable, in each request You make to access to the Location API(s).
-
-You may terminate Your registration if You no longer wish to use the Service. After termination, You may not access the Service. Nokia may terminate Your registration or restrict Your access to certain parts of the Service if there is an indication that You have breached these terms or with a prior notice if You have not signed into the Service with Your identifier code in the past three (3) months.
-
-3. Changes
-
-Nokia may, in its sole discretion, change, improve and correct the Service from time to time. Nokia may also provide with updates to the Service that are considered as important or critical by Nokia, and in such case You may not continue using the previous version of the Service and the use of the previous version of the Service may be prevented without installation of the update. The Service may not be available during maintenance breaks and other times. Nokia may also decide to discontinue the Service or any part thereof in its sole discretion. In such case You will be provided a prior notification and Nokia may terminate the Agreement accordingly.
-
-Except as set forth in Privacy Policy, Nokia shall not be responsible for any removal or loss of the information or content You have submitted (“Material”) to the Service when Your registration is terminated. After the Material is removed from the Service by either You or Nokia, traces and copies of the Material may still remain.
-
-Nokia reserves the right to modify or amend these terms and conditions at any time without prior notice. If the terms are changed in a material, adverse way, Nokia will provide a separate notice advising of such change. In order to continue using the Service, You must accept and agree to the new terms and conditions. If You do not agree to new terms, Your use of the Service will be suspended or terminated by Nokia.
-
-4. Use of Location API Developer Package
-
-The Location API Developer Package is made accessible to You for the purposes of incorporating the Service into Your Application and for the limited purposes of evaluating, testing, and controlling the Location API For Developers during the term of this Agreement, subject to the limitations set forth in Section 2 of these additional terms set forth above. If you have not registered for the Service, You may not distribute your Applications incorporating the Service.
-
-When using the Location API Developer Package and/or the Service, unless otherwise agreed in writing with Nokia, You hereby agree that You will not:
-
-(i) use or incorporate, without Nokia’s prior written permission, the Service, Location API Developer Package or any part thereof, in connection with any Application or other service (a) which has the primary functionality of providing turn-by-turn navigation services, real time navigation or route guidance; or (b) where such Application’s functionality is substantially similar to the Nokia Maps or navigation/location-based products distributed by Nokia or its affiliates; or (c) which has the primary purpose of capturing or collecting end user data;
-
-(ii) use, without Nokia’s prior written permission, the Service or Location API For Developers, or any part thereof, in connection with any internal business Application the purpose of which is directly related to the operation of Your core business and where the users of such Application are Your employees or contractors (e.g. fleet or asset management and tracking);
-
-(iii) remove, obscure, modify or omit, any copyright or trademark notices or other similar notices or markings or legends or branding requirements from the Location API Developer Package, Location API For Developers, Nokia Maps Content, or the Places Content whether such notices, markings or legends or other branding requirements originate from Nokia or a third party;
-
-(iv) alter or manipulate the order of search, geo-coding and/or reverse geo-coding results delivered by or through any Location API to or as part of the Application (where applicable);
-
-(v) alter, delete or otherwise change any Nokia Maps Content or Places Content, including third party content contained in the Nokia Maps Content or Places Content, branding or sponsorship information, that is displayed through the use of the Service or Location API For Developers;
-
-(vi) create an Application which obsures or alters the visibility of Places Content and/or Nokia Maps Content or any other content; or
-
-(v) use the Location API(s) or Service to exceed any transaction volume limits (if any) set by Nokia for Applications, Location APIs and/or Services. The amount of the possible transaction volume limit is as set forth in the documentation included in the Location API. Nokia may change the limit from time to time in its sole discretion, but will provide You with sixty (60) days’ advance notice of a change in the volume limit. Any programmatic methods or other actions intended to circumvent the transaction volume limits shall be considered a material breach of this Agreement;
-
-(vii) access, or use the Service any Nokia Maps Content or Places Content through any technology or means other than those provided by the Service or Location API(s), or through other explicitly authorized means Nokia may designate;
-
-(viii) use the Service, Location API or Location API For Developers in a manner that gives You or any other person access to mass downloads or bulk feeds of any Nokia Maps Content or Places Content, including but not limited to numerical latitude or longitude coordinates;
-
-(ix) pre-fetch, cache, or store any Nokia Maps Content or Places Content except that You may store (i) references and IDs; and (ii) limited amounts of Nokia Maps Content or Places Conent solely for the purpose of testing your Application, if You do so temporarily, securely, and in a manner that does not permit use of the Nokia Maps Content or Places Content outside of the Service; or
-
-(x) use the Location API Developer Package, including the Location API For Developers, or the Service in any manner or for any purpose that violates this Agreement or any law or regulation, including without limitation, any intellectual property or other proprietary rights, any right of any person, rights of privacy, or rights of personality; or
-
-(xi) use the Location API(s) to issue queries that are not in response to end user actions; or
-
-(xii) create Application(s) which do not display the results of every such search made by such Application(s) using the Location API(s) to the end user; or
-
-(xiii) distribute in any manner, such as through the Location API(s), Nokia Maps Content or Places Content collected using the Location API(s), or data derived from the Nokia Maps Content or Places Content, including, but not limited to location corrections.
-
-If screen size constraints prevent Nokia Maps Content or Places Content from being displayed with search or detail results, You shall display a notice informing the end user that the Nokia Maps Content or Places Content cannot be displayed.
-
-You also agree (i) to comply with these terms, applicable laws and good manners; (ii) not to distribute or post spam, unreasonably large files, chain letters, pyramid schemes, viruses or any other technologies that may harm the Service, or the interest or property of the Service users; (iii) not to use the Service in connection with any unlawful, offensive, abusive, pornographic, harassing, libelous or otherwise inappropriate Material and comply with Nokia Content Guidelines as may be provided by Nokia from time to time; and (iv) to respect the privacy of others. You agree to comply with Nokia Technical Guidelines and other guidelines as Nokia may provide from time to time.
-
-5. Nokia Maps Content and Publication
-
-Nokia Maps Content and Places Content are provided to You and Your end users for planning purposes only and Nokia does not guarantee the accuracy or availability of any Nokia Maps Content or Places Content. You may find that weather conditions, construction projects, closures or other events may cause road conditions, directions, positioning coordinates or other location information to differ from the results depicted in the Nokia Maps Content or Places Content. All use of Nokia Maps Content and/or Places Content is at Your own risk.
-
-6. Privacy and Ovi store publication
-
-You agree that Your use of the Services and Location API will comply with the Nokia Privacy Policy (http://www.nokia.com/privacy-policy).
-
-If your Application enables You or any party to gain access to information about users, including but not limited to personally identifiable information, non-personally identifiable usage information or location information (“Information”), You must provide users with notice about what Information is accessible and how such Information will be used or disclosed so that users may make informed decisions about whether or not to use Your Application. Furthermore, you must make Your privacy policy regarding the use of Information publicly available.
-
-If You intend to publish your Application on Nokia’s Ovi Store, please note that Your Application must comply with the Ovi Store Publication Requirements (https://publish.ovi.com/info/).
-
-7. Fees
-
-Your use of the Service may be or may become subject to charges. Nokia reserves the right to charge for the Service and to change its fees from time to time, at its discretion, but Nokia will provide You with sixty (60) days’ advance notice if charges will be implemented for use of the Service.
-
-8. Availability
-
-The Service may not be available in all countries and may be provided only in selected languages. The Service may be network dependent, contact Your network service provider for more information.
-
-9. Your Services
-
-You may interact with users, including consumers, on or through the Service. You agree that any such interactions by You do not involve Nokia and are solely between You and the other user(s).
-
-10. Links to Third Party Sites, Content and Advertising
-
-Nokia may include links to sites on the Internet that are owned or operated by third parties and that are not part of the Service. Upon following a link to such a third-party site, You shall review and agree to that site's rules of use before using such site.
-
-You agree that Nokia has no control over the content of third-party sites and cannot assume any responsibility for services provided or material created or published by such sites. A link to a third-party site does not imply that Nokia endorses the site or the products or services referenced in the site.
-
-In addition, users may create links within the Service to content that has not otherwise been submitted to the Service. You agree that Nokia is neither responsible nor liable for any such links. Moreover, Nokia Maps Content and Places Content made available to You by Nokia, may include content and data that originates from third parties.
-
-Nokia reserves the right, in its sole discretion, to implement advertising in the Location API For Developers. Unless otherwise agreed in writing between You and Nokia, and if Nokia implements advertising, You agree not to remove, otherwise alter, tamper with; or obsure such advertising. Nokia will provide You with sixty (60) days’ advance written notice prior to implementing advertising in the Location API For Developers.
-
-11. Reporting
-
-You agree to implement those reporting mechanisms specified by Nokia (if any). For example, if specified by Nokia, You agree to provide Nokia with reports if your Application which utilizes the Location API(s) detects its own location through the use of a sensor (including, but not limited to GPS, cell triangulation, WiFi or similar functionality) to display the location of the device on a map or to calculate a route.
-
-12. Additional Export Control Restrictions
-
-The Service and Location API Developer Package, including technical data, includes cryptographic software subject to export controls under the U.S. Export Administration Regulations ("EAR") and may be subject to import or export controls in other countries. The EAR prohibits the use of the Service and the Location API Developer Package and technical data by a Government End User, as defined hereafter, without a license from the U.S. government. A Government End User is defined in Part 772 of the EAR as "any foreign central, regional, or local government department, agency, or other entity performing governmental functions; including governmental research institutions, governmental corporations, or their separate business units (as defined in part 772 of the EAR) which are engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List, and international governmental organizations. This term does not include: utilities, telecommunications companies and Internet service providers; banks and financial institutions; transportation; broadcast or entertainment; educational organizations; civil health and medical organizations; retail or wholesale firms; and manufacturing or industrial entities not engaged in the manufacture or distribution of items or services controlled on the Wassenaar Munitions List. You agree to strictly comply with all applicable import and export regulations and acknowledge that You have the responsibility to obtain licenses to export, re-export, transfer, or import the Service and the Location API Developer Package. You further represent that You are not a Government End User as defined above, and You will not transfer the Service and the Location API Developer Package to any Government End User without a license.
-
diff --git a/src/plugins/places/nokia/nokia.pro b/src/plugins/places/nokia/nokia.pro
deleted file mode 100644
index d1c2bf07..00000000
--- a/src/plugins/places/nokia/nokia.pro
+++ /dev/null
@@ -1,91 +0,0 @@
-load(qt_module)
-
-TARGET = qtplaces_nokia
-QT += location network script
-
-include($$QT_SOURCE_TREE/src/plugins/qpluginbase.pri)
-
-DESTDIR = $$QT.location.plugins/places
-#QTDIR_build:REQUIRES += "contains(QT_CONFIG, location)"
-
-HEADERS += \
-#data classes
-#parsers
- qplacejsonparser_p.h \
- qplacejsoncategoriesparser.h \
- qplacejsondetailsparser.h \
- qplacejsonmediaparser.h \
- qplacejsonrecommendationparser.h \
- qplacejsonreviewparser.h \
- qplacejsonsearchparser.h \
- qplacejsontextpredictionparser.h \
-#query classes
-#reply classes
- qplacecategoriesreplyimpl.h \
- qplacemediareplyimpl.h \
- qplacedetailsreplyimpl.h \
- qplaceratingreplyimpl.h \
- qplacerecommendationreplyimpl.h \
- qplacereviewreplyimpl.h \
- qplacesearchreplyimpl.h \
- qplacetextpredictionreplyimpl.h \
-#manager and engine
- qplacemanagerengineimpl.h \
- qplacecategoriesrepository.h \
- qplacerestreply.h \
- qplacerestmanager.h \
- qplacesuppliersrepository.h \
- placemanagerenginefactory_nokia.h
-
-SOURCES += \
-#data classes
-#parsers
- qplacejsonparser.cpp \
- qplacejsoncategoriesparser.cpp \
- qplacejsondetailsparser.cpp \
- qplacejsonmediaparser.cpp \
- qplacejsonrecommendationparser.cpp \
- qplacejsonreviewparser.cpp \
- qplacejsonsearchparser.cpp \
- qplacejsontextpredictionparser.cpp \
-#query classes
-#reply classes
- qplacecategoriesreplyimpl.cpp \
- qplacedetailsreplyimpl.cpp \
- qplacemediareplyimpl.cpp \
- qplaceratingreplyimpl.cpp \
- qplacerecommendationreplyimpl.cpp \
- qplacereviewreplyimpl.cpp \
- qplacesearchreplyimpl.cpp \
- qplacetextpredictionreplyimpl.cpp \
-#manager and engine
- qplacemanagerengineimpl.cpp \
- qplacecategoriesrepository.cpp \
- qplacerestreply.cpp \
- qplacerestmanager.cpp \
- qplacesuppliersrepository.cpp \
- placemanagerenginefactory_nokia.cpp
-
-
-INCLUDEPATH += $$QT.location.includes
-
-message($$QT.location.includes)
-
-#INCLUDEPATH += $$SOURCE_DIR/src/location \
-# $$SOURCE_DIR/src/location/maps \
-# $$SOURCE_DIR/src/location/maps/tiled
-
-symbian {
- TARGET.EPOCALLOWDLLDATA = 1
- TARGET.CAPABILITY = ALL -TCB
- #TODO: Fill in uid3 id for Symbian
- TARGET.UID3 =
- pluginDep.sources = $${TARGET}.dll
- pluginDep.path = $${QT_PLUGINS_BASE_DIR}/$${PLUGIN_TYPE}
- DEPLOYMENT += pluginDep
- LIBS += -lefsrv
-}
-
-target.path += $$[QT_INSTALL_PLUGINS]/places
-INSTALLS += target
-
diff --git a/src/plugins/places/nokia/placemanagerenginefactory_nokia.cpp b/src/plugins/places/nokia/placemanagerenginefactory_nokia.cpp
deleted file mode 100644
index ae9fc22b..00000000
--- a/src/plugins/places/nokia/placemanagerenginefactory_nokia.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-** This file is part of the Ovi services plugin for the Maps and
-** Navigation API. The use of these services, whether by use of the
-** plugin or by other means, is governed by the terms and conditions
-** described by the file OVI_SERVICES_TERMS_AND_CONDITIONS.txt in
-** this package, located in the directory containing the Ovi services
-** plugin source code.
-**
-****************************************************************************/
-
-#include "placemanagerenginefactory_nokia.h"
-#include <QtPlugin>
-#include "qplacemanagerengineimpl.h"
-
-PlaceManagerEngineFactoryNokia::PlaceManagerEngineFactoryNokia() {}
-
-PlaceManagerEngineFactoryNokia::~PlaceManagerEngineFactoryNokia() {}
-
-QString PlaceManagerEngineFactoryNokia::managerName() const
-{
- return "nokia";
-}
-
-QPlaceManagerEngine * PlaceManagerEngineFactoryNokia::engine(const QMap<QString, QString> &parameters,
- QPlaceManager::Error *error,
- QString *errorString) {
- return new QPlaceManagerEngineImpl;
-}
-
-
-Q_EXPORT_PLUGIN2(qtplaces_nokia, PlaceManagerEngineFactoryNokia)
diff --git a/src/plugins/places/places.pro b/src/plugins/places/places.pro
deleted file mode 100644
index 85243cc6..00000000
--- a/src/plugins/places/places.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS = nokia
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index 60dc0954..94f3a9d9 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -1,3 +1,2 @@
TEMPLATE = subdirs
-SUBDIRS += geoservices \
- places
+SUBDIRS += geoservices