summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/imports/location/declarativeplaces/declarativeplaces.pri2
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativecontact.cpp105
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativecontact_p.h58
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplace.cpp78
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplace_p.h11
-rw-r--r--src/imports/location/location.cpp2
-rw-r--r--src/location/places/places.pri3
-rw-r--r--src/location/places/qplacecontact.cpp169
-rw-r--r--src/location/places/qplacecontact.h90
-rw-r--r--src/location/places/qplacecontact_p.h68
-rw-r--r--src/location/qgeoplace.cpp20
-rw-r--r--src/location/qgeoplace.h3
-rw-r--r--src/location/qgeoplace_p.h1
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp14
-rw-r--r--src/plugins/geoservices/nokia/places/qplacejsonsearchparser.cpp13
15 files changed, 6 insertions, 631 deletions
diff --git a/src/imports/location/declarativeplaces/declarativeplaces.pri b/src/imports/location/declarativeplaces/declarativeplaces.pri
index 557165bd..e6ae3e90 100644
--- a/src/imports/location/declarativeplaces/declarativeplaces.pri
+++ b/src/imports/location/declarativeplaces/declarativeplaces.pri
@@ -11,7 +11,6 @@ SOURCES += \
declarativeplaces/qdeclarativebusinessfeature.cpp \
declarativeplaces/qdeclarativebusinessinformation.cpp \
declarativeplaces/qdeclarativecategory.cpp \
- declarativeplaces/qdeclarativecontact.cpp \
declarativeplaces/qdeclarativedescription.cpp \
declarativeplaces/qdeclarativemediaobject.cpp \
declarativeplaces/qdeclarativeperiod.cpp \
@@ -34,7 +33,6 @@ HEADERS += \
declarativeplaces/qdeclarativebusinessfeature_p.h \
declarativeplaces/qdeclarativebusinessinformation_p.h \
declarativeplaces/qdeclarativecategory_p.h \
- declarativeplaces/qdeclarativecontact_p.h \
declarativeplaces/qdeclarativedescription_p.h \
declarativeplaces/qdeclarativemediaobject_p.h \
declarativeplaces/qdeclarativeperiod_p.h \
diff --git a/src/imports/location/declarativeplaces/qdeclarativecontact.cpp b/src/imports/location/declarativeplaces/qdeclarativecontact.cpp
deleted file mode 100644
index 2ad1a0f2..00000000
--- a/src/imports/location/declarativeplaces/qdeclarativecontact.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-#include "qdeclarativecontact_p.h"
-
-QT_USE_NAMESPACE
-
-/*!
- \qmlclass Contact
-
- \brief The Contact element holds contact data.
- \inherits QObject
-
- \ingroup qml-places
-*/
-
-QDeclarativeContact::QDeclarativeContact(QObject* parent)
- : QObject(parent)
-{
-}
-
-QDeclarativeContact::QDeclarativeContact(const QPlaceContact &value,
- QObject *parent)
- : QObject(parent),
- m_value(value)
-{
-}
-
-QDeclarativeContact::~QDeclarativeContact()
-{
-}
-
-void QDeclarativeContact::setContact(const QPlaceContact &value)
-{
- QPlaceContact previous = m_value;
- m_value = value;
-
- if (previous.description() != m_value.description()) {
- emit descriptionChanged();
- }
- if (previous.type() != m_value.type()) {
- emit typeChanged();
- }
- if (previous.value() != m_value.value()) {
- emit valueChanged();
- }
-}
-
-QPlaceContact QDeclarativeContact::contact() const
-{
- return m_value;
-}
-
-/*!
- \qmlproperty string Contact::description
-
- This property holds description.
-*/
-
-void QDeclarativeContact::setDescription(const QString &description)
-{
- if (m_value.description() != description) {
- m_value.setDescription(description);
- emit descriptionChanged();
- }
-}
-
-QString QDeclarativeContact::description() const
-{
- return m_value.description();
-}
-
-/*!
- \qmlproperty string Contact::type
-
- This property holds type.
-*/
-void QDeclarativeContact::setType(const QDeclarativeContact::ContactType &type)
-{
- if (m_value.type() != (QPlaceContact::ContactType)type) {
- m_value.setType((QPlaceContact::ContactType)type);
- emit typeChanged();
- }
-}
-
-QDeclarativeContact::ContactType QDeclarativeContact::type() const
-{
- return (QDeclarativeContact::ContactType) m_value.type();
-}
-
-/*!
- \qmlproperty string Contact::value
-
- This property holds value.
-*/
-
-void QDeclarativeContact::setValue(const QString &value)
-{
- if (m_value.value() != value) {
- m_value.setValue(value);
- emit valueChanged();
- }
-}
-
-QString QDeclarativeContact::value() const
-{
- return m_value.value();
-}
diff --git a/src/imports/location/declarativeplaces/qdeclarativecontact_p.h b/src/imports/location/declarativeplaces/qdeclarativecontact_p.h
deleted file mode 100644
index 5dab8a49..00000000
--- a/src/imports/location/declarativeplaces/qdeclarativecontact_p.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef QDECLARATIVECONTACT_P_H
-#define QDECLARATIVECONTACT_P_H
-
-#include <qplacecontact.h>
-#include <QtDeclarative/qdeclarative.h>
-
-#include <QObject>
-
-QT_BEGIN_NAMESPACE
-
-class QDeclarativeContact : public QObject
-{
- Q_OBJECT
-
- Q_ENUMS(ContactType)
-
- Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged);
- Q_PROPERTY(QString value READ value WRITE setValue NOTIFY valueChanged);
- Q_PROPERTY(ContactType type READ type WRITE setType NOTIFY typeChanged);
-
-public:
- enum ContactType {
- Phone,
- Email,
- Url,
- Fax,
- IM,
- Undefined
- };
-
- explicit QDeclarativeContact(QObject* parent = 0);
- explicit QDeclarativeContact(const QPlaceContact &value, QObject* parent = 0);
- ~QDeclarativeContact();
-
- QPlaceContact contact() const;
- void setContact(const QPlaceContact &value);
-
- QString description() const;
- void setDescription(const QString& data);
- ContactType type() const;
- void setType(const ContactType &data);
- QString value() const;
- void setValue(const QString& data);
-
-signals:
- void descriptionChanged();
- void valueChanged();
- void typeChanged();
-
-private:
- QPlaceContact m_value;
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeContact));
-
-#endif // QDECLARATIVECONTACT_P_H
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
index 93bc89e9..9de677a9 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
@@ -13,7 +13,7 @@ QT_USE_NAMESPACE
\inherits QObject
Place cointains many properties holding data of the place like location,
- id, contacts etc.
+ id, name etc.
\ingroup qml-places
*/
@@ -29,7 +29,6 @@ QDeclarativePlace::QDeclarativePlace(const QGeoPlace &src, QObject *parent)
m_complete(false)
{
synchronizeCategories();
- synchronizeContacts();
synchronizeDescriptions();
synchronizeSuppliers();
m_rating.setRating(m_src.rating());
@@ -104,10 +103,6 @@ void QDeclarativePlace::setPlace(const QGeoPlace &src)
synchronizeCategories();
emit categoriesChanged();
}
- if (previous.contacts() != m_src.contacts()) {
- synchronizeContacts();
- emit contactsChanged();
- }
if (previous.descriptions() != m_src.descriptions()) {
synchronizeDescriptions();
emit descriptionsChanged();
@@ -156,11 +151,6 @@ QGeoPlace QDeclarativePlace::place()
categories.append(value->category());
}
m_src.setCategories(categories);
- QList<QPlaceContact> contacts;
- foreach (QDeclarativeContact *value, m_contacts) {
- contacts.append(value->contact());
- }
- m_src.setContacts(contacts);
QList<QPlaceDescription> descriptions;
foreach (QDeclarativeDescription *value, m_descriptions) {
descriptions.append(value->description());
@@ -541,72 +531,6 @@ void QDeclarativePlace::synchronizeCategories()
}
/*!
- \qmlproperty QDeclarativeListProperty<QDeclarativeContact> Place::contacts
-
- This property contacts list.
-
- Note: this property's changed() signal is currently emitted only if the
- whole element changes, not if only the contents of the element change.
-*/
-QDeclarativeListProperty<QDeclarativeContact> QDeclarativePlace::contacts()
-{
- return QDeclarativeListProperty<QDeclarativeContact>(this,
- 0, // opaque data parameter
- contact_append,
- contact_count,
- contact_at,
- contact_clear);
-}
-
-void QDeclarativePlace::contact_append(QDeclarativeListProperty<QDeclarativeContact> *prop,
- QDeclarativeContact *value)
-{
- QDeclarativePlace* object = static_cast<QDeclarativePlace*>(prop->object);
- QDeclarativeContact *altValue = new QDeclarativeContact(object);
- altValue->setContact(value->contact());
- object->m_contacts.append(altValue);
- QList<QPlaceContact> list = object->m_src.contacts();
- list.append(value->contact());
- object->m_src.setContacts(list);
- emit object->contactsChanged();
-}
-
-int QDeclarativePlace::contact_count(QDeclarativeListProperty<QDeclarativeContact> *prop)
-{
- return static_cast<QDeclarativePlace*>(prop->object)->m_contacts.count();
-}
-
-QDeclarativeContact* QDeclarativePlace::contact_at(QDeclarativeListProperty<QDeclarativeContact> *prop,
- int index)
-{
- QDeclarativePlace* object = static_cast<QDeclarativePlace*>(prop->object);
- QDeclarativeContact *res = NULL;
- if (object->m_contacts.count() > index && index > -1) {
- res = object->m_contacts[index];
- }
- return res;
-}
-
-void QDeclarativePlace::contact_clear(QDeclarativeListProperty<QDeclarativeContact> *prop)
-{
- QDeclarativePlace* object = static_cast<QDeclarativePlace*>(prop->object);
- qDeleteAll(object->m_contacts);
- object->m_contacts.clear();
- object->m_src.setContacts(QList<QPlaceContact>());
- emit object->contactsChanged();
-}
-
-void QDeclarativePlace::synchronizeContacts()
-{
- qDeleteAll(m_contacts);
- m_contacts.clear();
- foreach (QPlaceContact value, m_src.contacts()) {
- QDeclarativeContact* declarativeValue = new QDeclarativeContact(value, this);
- m_contacts.append(declarativeValue);
- }
-}
-
-/*!
\qmlproperty QDeclarativeListProperty<QDeclarativeDescription> Place::descriptions
This property descriptions list.
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplace_p.h b/src/imports/location/declarativeplaces/qdeclarativeplace_p.h
index dfeef5ca..7a317e92 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplace_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativeplace_p.h
@@ -8,7 +8,6 @@
#include "qdeclarativebusinessinformation_p.h"
#include "qdeclarativecategory_p.h"
#include "qdeclarativesupplier_p.h"
-#include "qdeclarativecontact_p.h"
#include "qdeclarativerating_p.h"
#include "qdeclarativedescription_p.h"
#include "qdeclarativereviewmodel_p.h"
@@ -25,7 +24,6 @@ class QDeclarativePlace : public QObject, public QDeclarativeParserStatus
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)
Q_PROPERTY(QDeclarativeListProperty<QDeclarativeDescription> descriptions READ descriptions NOTIFY descriptionsChanged)
Q_PROPERTY(QDeclarativeGeoLocation* location READ location WRITE setLocation NOTIFY locationChanged);
Q_PROPERTY(QDeclarativeBusinessInformation* businessInformation READ businessInformation WRITE setBusinessInformation NOTIFY businessInformationChanged);
@@ -69,12 +67,6 @@ public:
static int category_count(QDeclarativeListProperty<QDeclarativeCategory> *prop);
static QDeclarativeCategory* category_at(QDeclarativeListProperty<QDeclarativeCategory> *prop, int index);
static void category_clear(QDeclarativeListProperty<QDeclarativeCategory> *prop);
- QDeclarativeListProperty<QDeclarativeContact> contacts();
- static void contact_append(QDeclarativeListProperty<QDeclarativeContact> *prop,
- QDeclarativeContact* value);
- static int contact_count(QDeclarativeListProperty<QDeclarativeContact> *prop);
- static QDeclarativeContact* contact_at(QDeclarativeListProperty<QDeclarativeContact> *prop, int index);
- static void contact_clear(QDeclarativeListProperty<QDeclarativeContact> *prop);
QDeclarativeListProperty<QDeclarativeDescription> descriptions();
static void descriptions_append(QDeclarativeListProperty<QDeclarativeDescription> *prop,
QDeclarativeDescription* value);
@@ -115,7 +107,6 @@ signals:
void pluginChanged();
void additionalDataChanged();
void categoriesChanged();
- void contactsChanged();
void descriptionsChanged();
void locationChanged();
void ratingChanged();
@@ -137,13 +128,11 @@ private slots:
private:
void synchronizeCategories();
- void synchronizeContacts();
void synchronizeDescriptions();
void synchronizeSuppliers();
private:
QList<QDeclarativeCategory*> m_categories;
- QList<QDeclarativeContact*> m_contacts;
QList<QDeclarativeDescription*> m_descriptions;
QDeclarativeGeoLocation m_location;
QDeclarativeRating m_rating;
diff --git a/src/imports/location/location.cpp b/src/imports/location/location.cpp
index acd59c34..a8ad1226 100644
--- a/src/imports/location/location.cpp
+++ b/src/imports/location/location.cpp
@@ -78,7 +78,6 @@
#include "qdeclarativebusinessfeature_p.h"
#include "qdeclarativebusinessinformation_p.h"
#include "qdeclarativecategory_p.h"
-#include "qdeclarativecontact_p.h"
#include "qdeclarativedescription_p.h"
#include "qdeclarativegeolocation_p.h"
#include "qdeclarativemediaobject_p.h"
@@ -195,7 +194,6 @@ public:
qmlRegisterType<QDeclarativeBusinessFeature>(uri, 5, 0, "BusinessFeature");
qmlRegisterType<QDeclarativeBusinessInformation>(uri, 5, 0, "BusinessInformation");
qmlRegisterType<QDeclarativeCategory>(uri, 5, 0, "Category");
- qmlRegisterType<QDeclarativeContact>(uri, 5, 0, "Contact");
qmlRegisterType<QDeclarativeDescription>(uri, 5, 0, "Description");
qmlRegisterType<QDeclarativeGeoLocation>(uri, 5, 0, "Location");
qmlRegisterType<QDeclarativeMediaObject>(uri, 5, 0, "MediaObject");
diff --git a/src/location/places/places.pri b/src/location/places/places.pri
index 1adb463e..784ed7a1 100644
--- a/src/location/places/places.pri
+++ b/src/location/places/places.pri
@@ -6,7 +6,6 @@ PUBLIC_HEADERS += \
places/qplacebusinessfeature.h \
places/qplacebusinessinformation.h \
places/qplacecategory.h \
- places/qplacecontact.h \
places/qplacedescription.h \
places/qplacemediaobject.h \
places/qplacepaginationlist.h \
@@ -36,7 +35,6 @@ PRIVATE_HEADERS += \
places/qplacebusinessfeature_p.h \
places/qplacebusinessinformation_p.h \
places/qplacecategory_p.h \
- places/qplacecontact_p.h \
places/qplacedescription_p.h \
places/qplacemediaobject_p.h \
places/qplaceperiod_p.h \
@@ -54,7 +52,6 @@ SOURCES += \
places/qplacebusinessfeature.cpp \
places/qplacebusinessinformation.cpp \
places/qplacecategory.cpp \
- places/qplacecontact.cpp \
places/qplacedescription.cpp \
places/qplacemediaobject.cpp \
places/qplaceperiod.cpp \
diff --git a/src/location/places/qplacecontact.cpp b/src/location/places/qplacecontact.cpp
deleted file mode 100644
index 05eb13c9..00000000
--- a/src/location/places/qplacecontact.cpp
+++ /dev/null
@@ -1,169 +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$
-**
-****************************************************************************/
-
-#include "qplacecontact.h"
-#include "qplacecontact_p.h"
-
-QT_USE_NAMESPACE
-
-QPlaceContactPrivate::QPlaceContactPrivate() : QSharedData()
-{
- this->type = QPlaceContact::Undefined;
-}
-
-QPlaceContactPrivate::QPlaceContactPrivate(const QPlaceContactPrivate &other)
- : QSharedData()
-{
- this->description = other.description;
- this->type = other.type;
- this->value = other.value;
-}
-
-QPlaceContactPrivate::~QPlaceContactPrivate()
-{
-}
-
-bool QPlaceContactPrivate::operator==(const QPlaceContactPrivate &other) const
-{
- return (
- this->description == other.description
- && this->type == other.type
- && this->value == other.value
- );
-}
-
-/*!
- \class QPlaceContact
-
- \inmodule QPlaces
-
- \brief The QPlaceContact class represents a contact object.
-
- Each QPlaceContact represents a contact object with a number of attributes
- such as type, data etc. Each QPlaceContact is associated with place.
-
- Contact objects are read-only, e.g. user of API might get contact object
- associated to specific place but can not edit its content. User might also create new
- contact object and add it to place.
-
- QPlaceContact is an in memory representation of a contact object.
-*/
-
-/*!
- Constructs an new contact object.
-*/
-QPlaceContact::QPlaceContact()
- : d(new QPlaceContactPrivate)
-{
-}
-
-/*!
- Constructs a copy of \a other
-*/
-QPlaceContact::QPlaceContact(const QPlaceContact &other)
- :d(other.d)
-{
-}
-
-/*!
- Destructor.
-*/
-QPlaceContact::~QPlaceContact()
-{
-}
-
-QPlaceContact &QPlaceContact::operator =(const QPlaceContact &other) {
- d = other.d;
- return *this;
-}
-
-bool QPlaceContact::operator==(const QPlaceContact &other) const
-{
- return (*(d.constData()) == *(other.d.constData()));
-}
-
-/*!
- Returns description.
-*/
-QString QPlaceContact::description() const
-{
- return d->description;
-}
-
-/*!
- Sets description.
-*/
-void QPlaceContact::setDescription(const QString &data)
-{
- d->description = data;
-}
-
-/*!
- Returns type.
-*/
-QPlaceContact::ContactType QPlaceContact::type() const
-{
- return d->type;
-}
-
-/*!
- Sets type.
-*/
-void QPlaceContact::setType(const QPlaceContact::ContactType &data)
-{
- d->type = data;
-}
-
-/*!
- Returns value.
-*/
-QString QPlaceContact::value() const
-{
- return d->value;
-}
-
-/*!
- Sets value.
-*/
-void QPlaceContact::setValue(const QString &data)
-{
- d->value = data;
-}
diff --git a/src/location/places/qplacecontact.h b/src/location/places/qplacecontact.h
deleted file mode 100644
index bec6d580..00000000
--- a/src/location/places/qplacecontact.h
+++ /dev/null
@@ -1,90 +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$
-**
-****************************************************************************/
-
-#ifndef QPLACECONTACT_H
-#define QPLACECONTACT_H
-
-#include <QSharedDataPointer>
-#include <QString>
-#include "qmobilityglobal.h"
-
-QT_BEGIN_NAMESPACE
-
-class QPlaceContactPrivate;
-
-class Q_LOCATION_EXPORT QPlaceContact
-{
-public:
- enum ContactType {
- Phone,
- Email,
- Url,
- Fax,
- IM,
- Undefined
- };
-
- QPlaceContact();
- QPlaceContact(const QPlaceContact &other);
-
- virtual ~QPlaceContact();
-
- QPlaceContact &operator=(const QPlaceContact &other);
-
- bool operator==(const QPlaceContact &other) const;
- bool operator!=(const QPlaceContact &other) const {
- return !(other == *this);
- }
-
- QString description() const;
- void setDescription(const QString& data);
- ContactType type() const;
- void setType(const ContactType &data);
- QString value() const;
- void setValue(const QString& data);
-
-private:
- QSharedDataPointer<QPlaceContactPrivate> d;
-};
-
-QT_END_NAMESPACE
-
-#endif // QPLACECONTACT_H
diff --git a/src/location/places/qplacecontact_p.h b/src/location/places/qplacecontact_p.h
deleted file mode 100644
index 8ef9228b..00000000
--- a/src/location/places/qplacecontact_p.h
+++ /dev/null
@@ -1,68 +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$
-**
-****************************************************************************/
-
-#ifndef QPLACECONTACT_P_H
-#define QPLACECONTACT_P_H
-
-#include <QSharedData>
-
-#include "qplacecontact.h"
-
-QT_BEGIN_NAMESPACE
-
-class QPlaceContactPrivate : public QSharedData
-{
-public:
- QPlaceContactPrivate();
- QPlaceContactPrivate(const QPlaceContactPrivate &other);
-
- ~QPlaceContactPrivate();
-
- bool operator==(const QPlaceContactPrivate &other) const;
-
- QString description;
- QPlaceContact::ContactType type;
- QString value;
-};
-
-QT_END_NAMESPACE
-
-#endif // QPLACECONTACT_P_H
diff --git a/src/location/qgeoplace.cpp b/src/location/qgeoplace.cpp
index e1e8eb3d..f0e7bfe7 100644
--- a/src/location/qgeoplace.cpp
+++ b/src/location/qgeoplace.cpp
@@ -289,24 +289,6 @@ void QGeoPlace::setCategories(const QList<QPlaceCategory> &categories)
}
/*!
- Returns contacts.
-*/
-QList<QPlaceContact> QGeoPlace::contacts() const
-{
- Q_D(const QGeoPlace);
- return d->contacts;
-}
-
-/*!
- Sets contacts.
-*/
-void QGeoPlace::setContacts(const QList<QPlaceContact> &contacts)
-{
- Q_D(QGeoPlace);
- d->contacts = contacts;
-}
-
-/*!
Returns descriptions.
*/
QList<QPlaceDescription> QGeoPlace::descriptions() const
@@ -579,7 +561,6 @@ QGeoPlacePrivate::QGeoPlacePrivate(const QGeoPlacePrivate &other)
additionalData(other.additionalData),
businessInfo(other.businessInfo),
categories(other.categories),
- contacts(other.contacts),
descriptions(other.descriptions),
location(other.location),
rating(other.rating),
@@ -641,7 +622,6 @@ bool QGeoPlacePrivate::operator== (const QGeoPlacePrivate &other) const
&& additionalData == other.additionalData
&& businessInfo == other.businessInfo
&& categories == other.categories
- && contacts == other.contacts
&& descriptions == other.descriptions
&& location == other.location
&& rating == other.rating
diff --git a/src/location/qgeoplace.h b/src/location/qgeoplace.h
index 4ca13482..1a64f180 100644
--- a/src/location/qgeoplace.h
+++ b/src/location/qgeoplace.h
@@ -52,7 +52,6 @@
#include "qgeolocation.h"
#include "qplacebusinessinformation.h"
#include "qplacecategory.h"
-#include "qplacecontact.h"
#include "qplacedescription.h"
#include "qplacerating.h"
#include "qplacepaginationlist.h"
@@ -96,8 +95,6 @@ public:
void setBusinessInformation(const QPlaceBusinessInformation &business);
QList<QPlaceCategory> categories() const;
void setCategories(const QList<QPlaceCategory> &categories);
- QList<QPlaceContact> contacts() const;
- void setContacts(const QList<QPlaceContact> &contacts);
QList<QPlaceDescription> descriptions() const;
void setDescriptions(const QList<QPlaceDescription> &descriptions);
QGeoLocation location() const;
diff --git a/src/location/qgeoplace_p.h b/src/location/qgeoplace_p.h
index be5fb8fe..5e2976cd 100644
--- a/src/location/qgeoplace_p.h
+++ b/src/location/qgeoplace_p.h
@@ -88,7 +88,6 @@ public:
QVariantHash additionalData;
QPlaceBusinessInformation businessInfo;
QList<QPlaceCategory> categories;
- QList<QPlaceContact> contacts;
QList<QPlaceDescription> descriptions;
QGeoLocation location;
QPlaceRating rating;
diff --git a/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp b/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp
index 6995c635..7b90f045 100644
--- a/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp
@@ -56,7 +56,6 @@
#include <qgeoaddress.h>
#include <qgeocoordinate.h>
#include <qgeoplace.h>
-#include <qplacecontact.h>
#include <qplacecategory.h>
#include <qplacedescription.h>
#include <qplacerating.h>
@@ -291,30 +290,23 @@ void QPlaceJSonDetailsParser::processMainProvider(const QScriptValue &placeValue
void QPlaceJSonDetailsParser::processContacts(const QScriptValue &contactsValue, QGeoPlace*targetPlace)
{
- QList<QPlaceContact> contacts;
QScriptValueIterator it(contactsValue);
while (it.hasNext()) {
it.next();
- QPlaceContact contact;
if (it.name() == place_contact_website_element) {
- contact.setType(QPlaceContact::Url);
}
if (it.name() == place_contact_phone_element) {
- contact.setType(QPlaceContact::Phone);
+
}
if (it.name() == place_contact_fax_element) {
- contact.setType(QPlaceContact::Fax);
}
if (it.name() == place_contact_im_element) {
- contact.setType(QPlaceContact::IM);
}
if (it.name() == place_contact_email_element) {
- contact.setType(QPlaceContact::Email);
}
- contact.setValue(it.value().toString());
- contacts.append(contact);
}
- targetPlace->setContacts(contacts);
+ //The JSON data specification still has contacts
+ //for now parse and skip.
}
void QPlaceJSonDetailsParser::processCategories(const QScriptValue &categories, QGeoPlace*targetPlace)
diff --git a/src/plugins/geoservices/nokia/places/qplacejsonsearchparser.cpp b/src/plugins/geoservices/nokia/places/qplacejsonsearchparser.cpp
index 8e821b03..a551bf71 100644
--- a/src/plugins/geoservices/nokia/places/qplacejsonsearchparser.cpp
+++ b/src/plugins/geoservices/nokia/places/qplacejsonsearchparser.cpp
@@ -56,7 +56,6 @@
#include <qgeoaddress.h>
#include <qgeolocation.h>
#include <qgeoplace.h>
-#include <qplacecontact.h>
#include <qplacerating.h>
#include <qplacecategory.h>
#include <qplacesupplier.h>
@@ -232,22 +231,14 @@ QPlaceSearchResult QPlaceJSonSearchParser::processPlaceElement(const QScriptValu
void QPlaceJSonSearchParser::processContacts(const QScriptValue &properties, QGeoPlace *place)
{
- QList<QPlaceContact> contacts;
QScriptValue value = properties.property(search_properties_url_value);
if (value.isValid() && !value.toString().isEmpty()) {
- QPlaceContact contact;
- contact.setType(QPlaceContact::Url);
- contact.setValue(value.toString());
- contacts.append(contact);
}
value = properties.property(search_properties_phone_value);
if (value.isValid() && !value.toString().isEmpty()) {
- QPlaceContact contact;
- contact.setType(QPlaceContact::Phone);
- contact.setValue(value.toString());
- contacts.append(contact);
}
- place->setContacts(contacts);
+ //The JSON data specification still has contacts so for now
+ //parse and skip
}