diff options
author | abcd <amos.choy@nokia.com> | 2012-05-15 18:56:11 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-25 03:01:15 +0200 |
commit | 6596ef821a3514384bff0b888e682ef29a5806e4 (patch) | |
tree | 67089aa3d4011cd8c9236e97d67b2add2aeb4f7d /src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp | |
parent | 7178b9bd014d793a18b1ec1f7b2ff6df4b9e6e7f (diff) | |
download | qtlocation-6596ef821a3514384bff0b888e682ef29a5806e4.tar.gz |
Refactor to allow specification for nokia icons only
There is an plugin parmeter called places.icons.custom
that defines whether custom 3rd party icons or nokia
icons are presented to the user for the jsondb plugin.
For the nokia plugins, nokia icons can be subdivded
into two types. The first is explictly set icons, the second
is icons generated from the categories.
In both cases the base icon is identified by the
nokiaIcon key and a base icon value.
However in the case of a generated icon there is
a nokiaIconGenerated key that is set to true.
When saving a place to the jsondb plugin, if
the icon is generated, the icon data is not saved to jsondb.
The category data however always is. When the place is
retrieved from jsondb, the base icon will be generated from the
category data.
If an icon is not generated, then the base icon is saved
to jsondb under the "nokiaIcon" field. When
the place is retried from jsondb, this field will be used
to provide the base icon.
Change-Id: I9100011c519185719cdd7b62e12c2386f7f0f8d7
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp')
-rw-r--r-- | src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp index 9eaddc84..2266ae56 100644 --- a/src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp +++ b/src/plugins/geoservices/nokia/placesv2/qplacecontentreplyimpl.cpp @@ -46,8 +46,9 @@ ** ****************************************************************************/ -#include "qplacecontentreplyimpl.h" #include "jsonparserhelpers.h" +#include "qplacecontentreplyimpl.h" +#include "../qplacemanagerengine_nokiav2.h" #include <QtCore/QJsonDocument> #include <QtCore/QJsonObject> @@ -55,10 +56,11 @@ QT_BEGIN_NAMESPACE QPlaceContentReplyImpl::QPlaceContentReplyImpl(const QPlaceContentRequest &request, - QNetworkReply *reply, QObject *parent) -: QPlaceContentReply(parent), m_reply(reply) - + QNetworkReply *reply, + QPlaceManagerEngineNokiaV2 *engine) + : QPlaceContentReply(engine), m_reply(reply), m_engine(engine) { + Q_ASSERT(engine); setRequest(request); if (!m_reply) @@ -101,7 +103,7 @@ void QPlaceContentReplyImpl::replyFinished() QPlaceContent::Collection collection; int totalCount; - parseCollection(request().contentType(), object, &collection, &totalCount); + parseCollection(request().contentType(), object, &collection, &totalCount, m_engine); setTotalCount(totalCount); setContent(collection); |