diff options
-rw-r--r-- | src/imports/location/declarativeplaces/qdeclarativeplace.cpp | 42 | ||||
-rw-r--r-- | src/imports/location/declarativeplaces/qdeclarativeplace_p.h | 8 | ||||
-rw-r--r-- | src/location/qplace.cpp | 44 | ||||
-rw-r--r-- | src/location/qplace.h | 6 | ||||
-rw-r--r-- | src/location/qplace_p.h | 2 | ||||
-rw-r--r-- | src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qplace/tst_qplace.cpp | 27 |
7 files changed, 3 insertions, 130 deletions
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp index c4b6fc45..06760891 100644 --- a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp +++ b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp @@ -160,18 +160,12 @@ void QDeclarativePlace::setPlace(const QPlace &src) synchronizeSuppliers(); emit suppliersChanged(); } - if (previous.feeds() != m_src.feeds()) { - emit feedsChanged(); - } if (previous.name() != m_src.name()) { emit nameChanged(); } if (previous.placeId() != m_src.placeId()) { emit placeIdChanged(); } - if (previous.tags() != m_src.tags()) { - emit tagsChanged(); - } if (previous.detailsFetched() != m_src.detailsFetched()) { emit detailsFetchedChanged(); } @@ -303,24 +297,6 @@ QString QDeclarativePlace::placeId() const } /*! - \qmlproperty stringlist Place::tags - - This property holds tag list. -*/ -void QDeclarativePlace::setTags(const QStringList &tags) -{ - if (m_src.tags() != tags) { - m_src.setTags(tags); - emit tagsChanged(); - } -} - -QStringList QDeclarativePlace::tags() const -{ - return m_src.tags(); -} - -/*! \qmlproperty bool Place::detailsFetched This property holds a boolean indicating @@ -370,24 +346,6 @@ QDeclarativePlace::Status QDeclarativePlace::status() const return m_status; } -/*! - \qmlproperty stringlist Place::feeds - - This property holds feeds list. -*/ -void QDeclarativePlace::setFeeds(const QStringList &feeds) -{ - if (m_src.feeds() != feeds) { - m_src.setFeeds(feeds); - emit feedsChanged(); - } -} - -QStringList QDeclarativePlace::feeds() const -{ - return m_src.feeds(); -} - void QDeclarativePlace::finished() { if (!m_reply) diff --git a/src/imports/location/declarativeplaces/qdeclarativeplace_p.h b/src/imports/location/declarativeplaces/qdeclarativeplace_p.h index 9c40e6b9..e3084859 100644 --- a/src/imports/location/declarativeplaces/qdeclarativeplace_p.h +++ b/src/imports/location/declarativeplaces/qdeclarativeplace_p.h @@ -72,10 +72,8 @@ class QDeclarativePlace : public QObject, public QDeclarativeParserStatus Q_PROPERTY(QDeclarativeGeoLocation* location READ location WRITE setLocation NOTIFY locationChanged); Q_PROPERTY(QDeclarativeRating* rating READ rating WRITE setRating NOTIFY ratingChanged); Q_PROPERTY(QDeclarativeListProperty<QDeclarativeSupplier> suppliers READ suppliers NOTIFY suppliersChanged) - Q_PROPERTY(QStringList feeds READ feeds WRITE setFeeds NOTIFY feedsChanged); Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged); Q_PROPERTY(QString placeId READ placeId WRITE setPlaceId NOTIFY placeIdChanged); - Q_PROPERTY(QStringList tags READ tags WRITE setTags NOTIFY tagsChanged); Q_PROPERTY(QDeclarativeReviewModel *reviewModel READ reviewModel NOTIFY reviewModelChanged) Q_PROPERTY(QDeclarativePlaceImageModel *imageModel READ imageModel NOTIFY imageModelChanged) @@ -132,14 +130,10 @@ public: static int suppliers_count(QDeclarativeListProperty<QDeclarativeSupplier> *prop); static QDeclarativeSupplier* suppliers_at(QDeclarativeListProperty<QDeclarativeSupplier> *prop, int index); static void suppliers_clear(QDeclarativeListProperty<QDeclarativeSupplier> *prop); - QStringList feeds() const; - void setFeeds(const QStringList &feeds); QString name() const; void setName(const QString &name); QString placeId() const; void setPlaceId(const QString &placeId); - QStringList tags() const; - void setTags(const QStringList &tags); bool detailsFetched() const; void setDetailsFetched(bool fetched); @@ -174,11 +168,9 @@ signals: void locationChanged(); void ratingChanged(); void suppliersChanged(); - void feedsChanged(); void nameChanged(); void placeIdChanged(); void businessInformationChanged(); - void tagsChanged(); void detailsFetchedChanged(); void fetchingDetailsChanged(); void reviewModelChanged(); diff --git a/src/location/qplace.cpp b/src/location/qplace.cpp index d3c0a9dd..fa26ae2b 100644 --- a/src/location/qplace.cpp +++ b/src/location/qplace.cpp @@ -227,24 +227,6 @@ void QPlace::setSuppliers(const QList<QPlaceSupplier> &data) } /*! - Returns feeds list. -*/ -QStringList QPlace::feeds() const -{ - Q_D(const QPlace); - return d->feeds; -} - -/*! - Sets feeds list. -*/ -void QPlace::setFeeds(const QStringList &feeds) -{ - Q_D(QPlace); - d->feeds = feeds; -} - -/*! Returns a collection of content associated with a place. This collection is a map with the key being the index of the content object and value being the content object itself. @@ -338,24 +320,6 @@ void QPlace::setPlaceId(const QString &placeId) } /*! - Returns list of tags. -*/ -QStringList QPlace::tags() const -{ - Q_D(const QPlace); - return d->tags; -} - -/*! - Sets tags. -*/ -void QPlace::setTags(const QStringList &tags) -{ - Q_D(QPlace); - d->tags = tags; -} - -/*! Returns the primary phone number for this place. */ QString QPlace::primaryPhone() const @@ -489,10 +453,8 @@ QPlacePrivate::QPlacePrivate(const QPlacePrivate &other) location(other.location), rating(other.rating), suppliers(other.suppliers), - feeds(other.feeds), name(other.name), placeId(other.placeId), - tags(other.tags), contentCollections(other.contentCollections), contentCounts(other.contentCounts), primaryPhone(other.primaryPhone), @@ -513,10 +475,8 @@ QPlacePrivate& QPlacePrivate::operator= (const QPlacePrivate & other) location = other.location; rating = other.rating; suppliers = other.suppliers; - feeds = other.feeds; name = other.name; placeId = other.placeId; - tags = other.tags; primaryPhone = other.primaryPhone; primaryFax = other.primaryFax; primaryEmail = other.primaryEmail; @@ -533,12 +493,10 @@ bool QPlacePrivate::operator== (const QPlacePrivate &other) const qDebug() << "location:" << (location == other.location); qDebug() << "rating" << (rating == other.rating); qDebug() << "suppliers" << (suppliers == other.suppliers); - qDebug() << "feeds " << (feeds == other.feeds); qDebug() << "contentCollections " << (contentCollections == other.contentCollections); qDebug() << "contentCounts " << (contentCounts == other.contentCounts); qDebug() << "name " << (name == other.name); qDebug() << "placeId" << (placeId == other.placeId); - qDebug() << "tags" << (tags == other.tags); qDebug() << "phone" << (primaryPhone == other.primaryPhone); qDebug() << "fax" << (primaryFax == other.primaryFax); qDebug() << "email" << (primaryEmail == other.primaryEmail); @@ -551,12 +509,10 @@ bool QPlacePrivate::operator== (const QPlacePrivate &other) const && location == other.location && rating == other.rating && suppliers == other.suppliers - && feeds == other.feeds && contentCollections == other.contentCollections && contentCounts == other.contentCounts && name == other.name && placeId == other.placeId - && tags == other.tags && primaryPhone == other.primaryPhone && primaryFax == other.primaryFax && primaryEmail == other.primaryEmail diff --git a/src/location/qplace.h b/src/location/qplace.h index 870bbd4d..be9aa592 100644 --- a/src/location/qplace.h +++ b/src/location/qplace.h @@ -42,7 +42,6 @@ #ifndef QPLACE_H #define QPLACE_H -#include "qmobilityglobal.h" #include <QSharedDataPointer> #include <QVariant> @@ -86,8 +85,6 @@ public: void setRating(const QPlaceRating &rating); QList<QPlaceSupplier> suppliers() const; void setSuppliers(const QList<QPlaceSupplier> &data); - QStringList feeds() const; - void setFeeds(const QStringList &feeds); QPlaceContent::Collection content(QPlaceContent::Type type) const; void setContent(QPlaceContent::Type type, const QPlaceContent::Collection &content); @@ -100,9 +97,6 @@ public: QString placeId() const; void setPlaceId(const QString &placeId); - QStringList tags() const; - void setTags(const QStringList &tags); - QString primaryPhone() const; void setPrimaryPhone(const QString &phone); diff --git a/src/location/qplace_p.h b/src/location/qplace_p.h index ac22cd94..d7b7d22c 100644 --- a/src/location/qplace_p.h +++ b/src/location/qplace_p.h @@ -82,10 +82,8 @@ public: QGeoLocation location; QPlaceRating rating; QList<QPlaceSupplier> suppliers; - QStringList feeds; QString name; QString placeId; - QStringList tags; QMap<QPlaceContent::Type, QPlaceContent::Collection> contentCollections; QMap<QPlaceContent::Type, int> contentCounts; diff --git a/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp b/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp index b36cdc83..b1b509da 100644 --- a/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp +++ b/src/plugins/geoservices/nokia/places/qplacejsondetailsparser.cpp @@ -473,7 +473,9 @@ void QPlaceJSonDetailsParser::processTags(const QScriptValue &tags, QPlace *targ } } } - targetPlace->setTags(newTags); + + // The JSON data specification defines a tags element, but our API doesn't expose tags so we + // parse and skip assignment. } void QPlaceJSonDetailsParser::processNames(const QScriptValue &names, QPlace *targetPlace) diff --git a/tests/auto/qplace/tst_qplace.cpp b/tests/auto/qplace/tst_qplace.cpp index 302244e0..65f7fe61 100644 --- a/tests/auto/qplace/tst_qplace.cpp +++ b/tests/auto/qplace/tst_qplace.cpp @@ -63,13 +63,11 @@ private Q_SLOTS: void locationTest(); void ratingTest(); void suppliersTest(); - void feedsTest(); void imageContentTest(); void reviewContentTest(); void contentCountTest(); void nameTest(); void placeIdTest(); - void tagsTest(); void primaryPhoneTest(); void primaryFaxTest(); void primaryEmailTest(); @@ -303,28 +301,6 @@ void tst_Place::suppliersTest() QVERIFY2(testObj.suppliers().count() == 2, "Wrong value returned"); } -void tst_Place::feedsTest() -{ - QPlace testObj; - QVERIFY2(testObj.feeds().count() == 0, "Wrong default value"); - QStringList list; - list << "1" << "2" << "3"; - testObj.setFeeds(list); - QVERIFY2(testObj.feeds().count() == 3, "Wrong value returned"); - QVERIFY2(testObj.feeds()[1] == "2", "Wrong [1] value returned"); -} - -void tst_Place::tagsTest() -{ - QPlace testObj; - QVERIFY2(testObj.tags().count() == 0, "Wrong default value"); - QStringList list; - list << "1" << "2" << "3"; - testObj.setTags(list); - QVERIFY2(testObj.tags().count() == 3, "Wrong value returned"); - QVERIFY2(testObj.tags()[1] == "2", "Wrong [1] value returned"); -} - void tst_Place::primaryPhoneTest() { QPlace place; @@ -382,9 +358,6 @@ void tst_Place::operatorsTest() paymentMethods.setLabel("Payment methods"); paymentMethods.setText("Visa"); testObj.insertExtendedAttribute(QPlaceAttribute::PaymentMethods, paymentMethods); - QStringList tags; - tags << "1" << "2" << "3"; - testObj.setTags(tags); QGeoLocation loc; loc.setCoordinate(QGeoCoordinate(10,20)); testObj.setLocation(loc); |