summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-15 23:21:44 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-22 18:08:44 +0200
commit34e64b8bb4e54185d3235a9d8cd15cd446eb20c1 (patch)
tree5dcc35a4b62c3041075b03e16c3eba91d879a455
parentb6d24bad6ce6f52624467a4fe4043caee6e59ab4 (diff)
downloadqtlocation-34e64b8bb4e54185d3235a9d8cd15cd446eb20c1.tar.gz
Cleanup: QPlaceContent and subclasses (2/3)
Remove deprecated APIs entirely, and add them as gone to the changes documentation. Change-Id: If55339881142b0fddc3f045d8c5a0eca0490c727 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/location/CMakeLists.txt12
-rw-r--r--src/location/places/qplaceeditorial.cpp79
-rw-r--r--src/location/places/qplaceeditorial.h73
-rw-r--r--src/location/places/qplaceimage.cpp81
-rw-r--r--src/location/places/qplaceimage.h77
-rw-r--r--src/location/places/qplacereview.cpp83
-rw-r--r--src/location/places/qplacereview.h86
-rw-r--r--tests/auto/CMakeLists.txt3
-rw-r--r--tests/auto/qplaceeditorial/CMakeLists.txt7
-rw-r--r--tests/auto/qplaceeditorial/tst_qplaceeditorial.cpp123
-rw-r--r--tests/auto/qplaceimage/CMakeLists.txt7
-rw-r--r--tests/auto/qplaceimage/tst_qplaceimage.cpp124
-rw-r--r--tests/auto/qplacereview/CMakeLists.txt7
-rw-r--r--tests/auto/qplacereview/tst_qplacereview.cpp172
14 files changed, 6 insertions, 928 deletions
diff --git a/src/location/CMakeLists.txt b/src/location/CMakeLists.txt
index 2cd289da..80faaf17 100644
--- a/src/location/CMakeLists.txt
+++ b/src/location/CMakeLists.txt
@@ -53,25 +53,25 @@ qt_internal_add_module(Location
places/qplacematchrequest.cpp places/qplacemanager.cpp
places/qplacecategory.cpp places/qplaceuser.cpp
places/qplacesearchresult.cpp places/qplacemanagerengine.cpp
- places/qplacereview.cpp places/qplacecontentreply.cpp
+ places/qplacecontentreply.cpp
places/qplacecontentrequest.cpp places/qplacesearchreply.cpp
places/qplacereply.cpp places/qplacedetailsreply.cpp
places/qplaceratings.cpp places/qplacecontactdetail.cpp
- places/qplaceproposedsearchresult.cpp places/qplaceeditorial.cpp
+ places/qplaceproposedsearchresult.cpp
places/qplace.cpp places/qplacesupplier.cpp
- places/qplaceattribute.cpp places/qplaceimage.cpp
+ places/qplaceattribute.cpp
places/qplacesearchsuggestionreply.cpp places/qplaceresult.cpp
places/qplacematchreply.cpp places/qplacecontent.cpp
places/qplaceidreply.cpp
places/qplaceicon.h places/qplaceuser.h
places/qplaceattribute_p.h places/qplacematchrequest.h
- places/qplacecontentreply.h places/qplacereview.h
+ places/qplacecontentreply.h
places/qplacecategory.h places/qplacesearchrequest.h
places/qplacecategory_p.h
places/qplaceproposedsearchresult.h places/qplacemanagerengine.h
places/qplacecontentrequest.h places/qplacemanagerengine_p.h
places/qplace.h places/qplacecontentrequest_p.h
- places/qplaceeditorial.h places/qplaceattribute.h
+ places/qplaceattribute.h
places/qplacedetailsreply.h
places/qplaceratings_p.h places/unsupportedreplies_p.h
places/qplacereply.h places/qplace_p.h places/qplaceresult_p.h
@@ -80,7 +80,7 @@ qt_internal_add_module(Location
places/qplacematchreply.h
places/qplacecontent.h places/qplacesearchreply.h
places/qplacesupplier_p.h places/qplaceratings.h
- places/qplaceimage.h places/qplacesearchresult.h
+ places/qplacesearchresult.h
places/qplaceidreply.h places/qplaceuser_p.h places/qplaceicon_p.h
places/qplacecontactdetail.h places/qplacesearchsuggestionreply.h
places/qplacecontent_p.h places/qplacesearchrequest_p.h
diff --git a/src/location/places/qplaceeditorial.cpp b/src/location/places/qplaceeditorial.cpp
deleted file mode 100644
index 103d76ed..00000000
--- a/src/location/places/qplaceeditorial.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2022 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qplaceeditorial.h"
-#include "qplacecontent_p.h"
-
-QT_USE_NAMESPACE
-
-/*!
- \class QPlaceEditorial
- \inmodule QtLocation
- \ingroup QtLocation-places
- \ingroup QtLocation-places-data
- \since 5.6
-
- \brief The QPlaceEditorial class represents a publisher's article describing a place.
-
- Each QPlaceEditorial has a title, text and language; in addition to those properties
- inherited from QPlaceContent.
-
- Note: The Places API only supports editorials as 'retrieve-only' objects. Submitting editorials
- to a provider is not a supported use case.
-
- \sa QPlaceContent
-*/
-
-#if QT_DEPRECATED_SINCE(6, 0)
-/*!
- Constructs a new editorial object.
-*/
-QPlaceEditorial::QPlaceEditorial()
- : QPlaceContent(QPlaceContent::EditorialType)
-{
-}
-
-/*!
- \fn QPlaceEditorial::QPlaceEditorial(const QPlaceContent &other)
- Constructs a copy of \a other if possible, otherwise constructs a default
- editorial object.
-*/
-Q_IMPLEMENT_CONTENT_COPY_CTOR(QPlaceEditorial, QPlaceContent::EditorialType)
-
-#endif // QT_DEPRECATED_SINCE(6, 0)
diff --git a/src/location/places/qplaceeditorial.h b/src/location/places/qplaceeditorial.h
deleted file mode 100644
index 6c543619..00000000
--- a/src/location/places/qplaceeditorial.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPLACEEDITORIAL_H
-#define QPLACEEDITORIAL_H
-
-#include <QtLocation/QPlaceContent>
-
-#include <QtCore/QVariant>
-
-QT_BEGIN_NAMESPACE
-
-#if QT_DEPRECATED_SINCE(6, 0)
-class Q_LOCATION_EXPORT QPlaceEditorial : public QPlaceContent
-{
-public:
- QT_DEPRECATED_VERSION_X_6_0("Use QPlaceContent") QPlaceEditorial();
- QT_DEPRECATED_VERSION_X_6_0("Use QPlaceContent") QPlaceEditorial(const QPlaceContent &other);
-
- QT_DEPRECATED_VERSION_X_6_0("Use value()") QString text() const
- { return value(QPlaceContent::EditorialText).value<QString>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setText(const QString &text)
- { setValue(QPlaceContent::EditorialText, QVariant::fromValue(text)); }
- QT_DEPRECATED_VERSION_X_6_0("Use value()") QString title() const
- { return value(QPlaceContent::EditorialTitle).value<QString>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setTitle(const QString &title)
- { setValue(QPlaceContent::EditorialTitle, QVariant::fromValue(title)); }
- QT_DEPRECATED_VERSION_X_6_0("Use value()") QString language() const
- { return value(QPlaceContent::EditorialLanguage).value<QString>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setLanguage(const QString &language)
- { setValue(QPlaceContent::EditorialLanguage, QVariant::fromValue(language)); }
-};
-#endif
-
-QT_END_NAMESPACE
-
-#endif // QPLACEEDITORIAL_H
diff --git a/src/location/places/qplaceimage.cpp b/src/location/places/qplaceimage.cpp
deleted file mode 100644
index 67e64efb..00000000
--- a/src/location/places/qplaceimage.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2022 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qplaceimage.h"
-#include "qplacecontent_p.h"
-
-QT_USE_NAMESPACE
-
-/*!
- \class QPlaceImage
- \inmodule QtLocation
- \ingroup QtLocation-places
- \ingroup QtLocation-places-data
- \since 5.6
-
- \brief The QPlaceImage class represents a reference to an image.
-
- Each QPlaceImage represents a set of metadata about an image such as it's
- url, identifier and MIME type. These are properties in addition to those provided
- by QPlaceContent.
-
- Note: The Places API only supports images as 'retrieve-only' objects. Submitting
- images to a provider is not a supported use case.
- \sa QPlaceContent
-*/
-
-#if QT_DEPRECATED_SINCE(6, 0)
-
-/*!
- Constructs an new QPlaceImage.
-*/
-QPlaceImage::QPlaceImage()
- : QPlaceContent(QPlaceContent::ImageType)
-{
-}
-
-/*!
- \fn QPlaceImage::QPlaceImage(const QPlaceContent &other)
- Constructs a copy of \a other if possible, otherwise constructs a default
- image object.
-*/
-Q_IMPLEMENT_CONTENT_COPY_CTOR(QPlaceImage, QPlaceContent::ImageType)
-
-
-#endif // QT_DEPRECATED_SINCE(6, 0)
diff --git a/src/location/places/qplaceimage.h b/src/location/places/qplaceimage.h
deleted file mode 100644
index b4e1f267..00000000
--- a/src/location/places/qplaceimage.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPLACEIMAGE_H
-#define QPLACEIMAGE_H
-
-#include <QtLocation/QPlaceContent>
-
-#include <QtCore/QString>
-#include <QtCore/QUrl>
-#include <QtCore/QVariant>
-
-QT_BEGIN_NAMESPACE
-
-#if QT_DEPRECATED_SINCE(6, 0)
-class Q_LOCATION_EXPORT QPlaceImage : public QPlaceContent
-{
-public:
- QT_DEPRECATED_VERSION_X_6_0("Use QPlaceContent") QPlaceImage();
- QT_DEPRECATED_VERSION_X_6_0("Use QPlaceContent") QPlaceImage(const QPlaceContent &other);
-
- QT_DEPRECATED_VERSION_X_6_0("Use value()") QUrl url() const
- { return value(QPlaceContent::ImageUrl).value<QUrl>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setUrl(const QUrl &url)
- { setValue(QPlaceContent::ImageUrl, QVariant::fromValue(url)); }
-
- QT_DEPRECATED_VERSION_X_6_0("Use value()") QString imageId() const
- { return value(QPlaceContent::ImageId).value<QString>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setImageId(const QString &identifier)
- { setValue(QPlaceContent::ImageId, QVariant::fromValue(identifier)); }
-
- QT_DEPRECATED_VERSION_X_6_0("Use value()") QString mimeType() const
- { return value(QPlaceContent::ImageMimeType).value<QString>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setMimeType(const QString &type)
- { setValue(QPlaceContent::ImageMimeType, QVariant::fromValue(type)); }
-};
-#endif
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/location/places/qplacereview.cpp b/src/location/places/qplacereview.cpp
deleted file mode 100644
index 87972488..00000000
--- a/src/location/places/qplacereview.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2022 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qplacereview.h"
-#include "qplacecontent_p.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QPlaceReview
- \inmodule QtLocation
- \ingroup QtLocation-places
- \ingroup QtLocation-places-data
- \since 5.6
-
- \brief The QPlaceReview class represents a review of a place.
-
- Each QPlaceReview has a number of properties such as
- a title, text, date of submission and rating; in addition to those properties
- inherited from QPlaceContent.
-
- Note: The Places API only supports reviews as 'retrieve-only' objects. Submitting reviews
- to a provider is not a supported use case.
-
- \sa QPlaceContent, QPlaceEditorial
-*/
-
-#if QT_DEPRECATED_SINCE(6, 0)
-
-/*!
- Constructs a new review object.
-*/
-QPlaceReview::QPlaceReview()
- : QPlaceContent(QPlaceContent::ReviewType)
-{
-}
-
-/*!
- \fn QPlaceReview::QPlaceReview(const QPlaceContent &other)
- Constructs a copy of \a other if possible, otherwise constructs a default
- review object.
-*/
-Q_IMPLEMENT_CONTENT_COPY_CTOR(QPlaceReview, QPlaceContent::ReviewType)
-
-QT_END_NAMESPACE
-
-#endif // QT_DEPRECATED_SINCE(6, 0)
diff --git a/src/location/places/qplacereview.h b/src/location/places/qplacereview.h
deleted file mode 100644
index 6f418969..00000000
--- a/src/location/places/qplacereview.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPLACEREVIEW_H
-#define QPLACEREVIEW_H
-
-#include <QtLocation/QPlaceContent>
-
-#include <QtCore/QDateTime>
-#include <QtCore/QVariant>
-
-QT_BEGIN_NAMESPACE
-
-#if QT_DEPRECATED_SINCE(6, 0)
-class Q_LOCATION_EXPORT QPlaceReview : public QPlaceContent
-{
-public:
- QT_DEPRECATED_VERSION_X_6_0("Use QPlaceContent") QPlaceReview();
- QT_DEPRECATED_VERSION_X_6_0("Use QPlaceContent") QPlaceReview(const QPlaceContent &other);
-
- QT_DEPRECATED_VERSION_X_6_0("Use value()") QDateTime dateTime() const
- { return value(QPlaceContent::ReviewDateTime).value<QDateTime>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setDateTime(const QDateTime &dateTime)
- { setValue(QPlaceContent::ReviewDateTime, QVariant::fromValue(dateTime)); }
- QT_DEPRECATED_VERSION_X_6_0("Use value()") QString text() const
- { return value(QPlaceContent::ReviewText).value<QString>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setText(const QString &text)
- { setValue(QPlaceContent::ReviewText, QVariant::fromValue(text)); }
- QT_DEPRECATED_VERSION_X_6_0("Use value()") QString language() const
- { return value(QPlaceContent::ReviewLanguage).value<QString>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setLanguage(const QString &language)
- { setValue(QPlaceContent::ReviewLanguage, QVariant::fromValue(language)); }
- QT_DEPRECATED_VERSION_X_6_0("Use value()") qreal rating() const
- { return value(QPlaceContent::ReviewRating).value<qreal>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setRating(qreal rating)
- { setValue(QPlaceContent::ReviewRating, QVariant::fromValue(rating)); }
- QT_DEPRECATED_VERSION_X_6_0("Use value()") QString reviewId() const
- { return value(QPlaceContent::ReviewId).value<QString>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setReviewId(const QString &identifier)
- { setValue(QPlaceContent::ReviewId, QVariant::fromValue(identifier)); }
- QT_DEPRECATED_VERSION_X_6_0("Use value()") QString title() const
- { return value(QPlaceContent::ReviewTitle).value<QString>(); }
- QT_DEPRECATED_VERSION_X_6_0("Use setValue()") void setTitle(const QString &title)
- { setValue(QPlaceContent::ReviewTitle, QVariant::fromValue(title)); }
-};
-#endif
-
-QT_END_NAMESPACE
-
-#endif // QPLACEREVIEW_H
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index 6a014f33..ed347367 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -9,15 +9,12 @@ if(TARGET Qt::Location)
add_subdirectory(qplacecontactdetail)
add_subdirectory(qplacecontentrequest)
add_subdirectory(qplacedetailsreply)
- add_subdirectory(qplaceeditorial)
add_subdirectory(qplacematchreply)
add_subdirectory(qplacematchrequest)
- add_subdirectory(qplaceimage)
add_subdirectory(qplaceratings)
add_subdirectory(qplaceresult)
add_subdirectory(qproposedsearchresult)
add_subdirectory(qplacereply)
- add_subdirectory(qplacereview)
add_subdirectory(qplacesearchrequest)
add_subdirectory(qplacesupplier)
add_subdirectory(qplacesearchresult)
diff --git a/tests/auto/qplaceeditorial/CMakeLists.txt b/tests/auto/qplaceeditorial/CMakeLists.txt
deleted file mode 100644
index 53e82744..00000000
--- a/tests/auto/qplaceeditorial/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-qt_internal_add_test(tst_qplaceeditorial
- SOURCES
- tst_qplaceeditorial.cpp
- LIBRARIES
- Qt::Core
- Qt::Location
-)
diff --git a/tests/auto/qplaceeditorial/tst_qplaceeditorial.cpp b/tests/auto/qplaceeditorial/tst_qplaceeditorial.cpp
deleted file mode 100644
index 934d94b0..00000000
--- a/tests/auto/qplaceeditorial/tst_qplaceeditorial.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/QString>
-#include <QtTest/QtTest>
-
-#include <QtLocation/QPlaceEditorial>
-#include <QtLocation/QPlaceSupplier>
-#include <QtLocation/QPlaceUser>
-
-#include "../utils/qlocationtestutils_p.h"
-
-QT_USE_NAMESPACE
-
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
-
-class tst_QPlaceEditorial : public QObject
-{
- Q_OBJECT
-
-public:
- tst_QPlaceEditorial();
-
-private Q_SLOTS:
- void constructorTest();
- void supplierTest();
- void textTest();
- void titleTest();
- void languageTest();
- void operatorsTest();
-};
-
-tst_QPlaceEditorial::tst_QPlaceEditorial()
-{
-}
-
-void tst_QPlaceEditorial::constructorTest()
-{
- QPlaceEditorial testObj;
- testObj.setText("testId");
- QPlaceEditorial *testObjPtr = new QPlaceEditorial(testObj);
- QVERIFY2(testObjPtr != NULL, "Copy constructor - null");
- QVERIFY2(*testObjPtr == testObj, "Copy constructor - compare");
- delete testObjPtr;
-}
-
-void tst_QPlaceEditorial::supplierTest()
-{
- QPlaceEditorial testObj;
- QVERIFY2(testObj.supplier().supplierId() == QString(), "Wrong default value");
- QPlaceSupplier sup;
- sup.setName("testName1");
- sup.setSupplierId("testId");
- testObj.setSupplier(sup);
- QVERIFY2(testObj.supplier() == sup, "Wrong value returned");
-}
-
-void tst_QPlaceEditorial::textTest()
-{
- QPlaceEditorial testObj;
- QVERIFY2(testObj.text() == QString(), "Wrong default value");
- testObj.setText("testText");
- QVERIFY2(testObj.text() == "testText", "Wrong value returned");
-}
-
-void tst_QPlaceEditorial::titleTest()
-{
- QPlaceEditorial testObj;
- QVERIFY2(testObj.title() == QString(), "Wrong default value");
- testObj.setTitle("testText");
- QVERIFY2(testObj.title() == "testText", "Wrong value returned");
-}
-
-void tst_QPlaceEditorial::languageTest()
-{
- QPlaceEditorial testObj;
- QVERIFY2(testObj.language() == QString(), "Wrong default value");
- testObj.setLanguage("testText");
- QVERIFY2(testObj.language() == "testText", "Wrong value returned");
-}
-
-void tst_QPlaceEditorial::operatorsTest()
-{
- QPlaceEditorial testObj;
- testObj.setLanguage("testValue");
- QPlaceEditorial testObj2;
- testObj2 = testObj;
- QVERIFY2(testObj == testObj2, "Not copied correctly");
- testObj2.setText("testValue2");
- QVERIFY2(testObj != testObj2, "Object should be different");
-}
-
-QT_WARNING_POP
-
-QTEST_APPLESS_MAIN(tst_QPlaceEditorial);
-
-#include "tst_qplaceeditorial.moc"
diff --git a/tests/auto/qplaceimage/CMakeLists.txt b/tests/auto/qplaceimage/CMakeLists.txt
deleted file mode 100644
index e88f0621..00000000
--- a/tests/auto/qplaceimage/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-qt_internal_add_test(tst_qplaceimage
- SOURCES
- tst_qplaceimage.cpp
- LIBRARIES
- Qt::Core
- Qt::Location
-)
diff --git a/tests/auto/qplaceimage/tst_qplaceimage.cpp b/tests/auto/qplaceimage/tst_qplaceimage.cpp
deleted file mode 100644
index a67eedd8..00000000
--- a/tests/auto/qplaceimage/tst_qplaceimage.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/QString>
-#include <QtLocation/QPlaceImage>
-#include <QtLocation/QPlaceUser>
-#include <QtLocation/QPlaceSupplier>
-#include <QtTest/QtTest>
-
-#include "../utils/qlocationtestutils_p.h"
-
-QT_USE_NAMESPACE
-
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
-
-class tst_QPlaceImage : public QObject
-{
- Q_OBJECT
-
-public:
- tst_QPlaceImage();
-
-private Q_SLOTS:
- void constructorTest();
- void supplierTest();
- void idTest();
- void mimeTypeTest();
- void attributionTest();
- void operatorsTest();
-};
-
-tst_QPlaceImage::tst_QPlaceImage()
-{
-}
-
-void tst_QPlaceImage::constructorTest()
-{
- QPlaceImage testObj;
- testObj.setImageId("testId");
- QPlaceImage *testObjPtr = new QPlaceImage(testObj);
- QVERIFY2(testObjPtr != NULL, "Copy constructor - null");
- QVERIFY2(*testObjPtr == testObj, "Copy constructor - compare");
- delete testObjPtr;
-}
-
-void tst_QPlaceImage::supplierTest()
-{
- QPlaceImage testObj;
- QVERIFY2(testObj.supplier().supplierId() == QString(), "Wrong default value");
- QPlaceSupplier sup;
- sup.setName("testName1");
- sup.setSupplierId("testId");
- testObj.setSupplier(sup);
- QVERIFY2(testObj.supplier() == sup, "Wrong value returned");
-}
-
-void tst_QPlaceImage::idTest()
-{
- QPlaceImage testObj;
- QVERIFY2(testObj.imageId() == QString(), "Wrong default value");
- testObj.setImageId("testText");
- QVERIFY2(testObj.imageId() == "testText", "Wrong value returned");
-}
-
-void tst_QPlaceImage::mimeTypeTest()
-{
- QPlaceImage testObj;
- QVERIFY2(testObj.mimeType() == QString(), "Wrong default value");
- testObj.setMimeType("testText");
- QVERIFY2(testObj.mimeType() == "testText", "Wrong value returned");
-}
-
-void tst_QPlaceImage::attributionTest()
-{
- QPlaceImage image;
- QVERIFY(image.attribution().isEmpty());
- image.setAttribution(QStringLiteral("Brought to you by acme"));
- QCOMPARE(image.attribution(), QStringLiteral("Brought to you by acme"));
- image.setAttribution(QString());
- QVERIFY(image.attribution().isEmpty());
-}
-
-void tst_QPlaceImage::operatorsTest()
-{
- QPlaceImage testObj;
- testObj.setMimeType("testValue");
- QPlaceImage testObj2;
- testObj2 = testObj;
- QVERIFY2(testObj == testObj2, "Not copied correctly");
- testObj2.setImageId("testValue2");
- QVERIFY2(testObj != testObj2, "Object should be different");
-}
-
-QT_WARNING_POP
-
-QTEST_APPLESS_MAIN(tst_QPlaceImage);
-
-#include "tst_qplaceimage.moc"
diff --git a/tests/auto/qplacereview/CMakeLists.txt b/tests/auto/qplacereview/CMakeLists.txt
deleted file mode 100644
index dfc485bd..00000000
--- a/tests/auto/qplacereview/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-qt_internal_add_test(tst_qplacereview
- SOURCES
- tst_qplacereview.cpp
- LIBRARIES
- Qt::Core
- Qt::Location
-)
diff --git a/tests/auto/qplacereview/tst_qplacereview.cpp b/tests/auto/qplacereview/tst_qplacereview.cpp
deleted file mode 100644
index b1607434..00000000
--- a/tests/auto/qplacereview/tst_qplacereview.cpp
+++ /dev/null
@@ -1,172 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtCore/QString>
-#include <QtTest/QtTest>
-
-#include <QtLocation/QPlaceReview>
-#include <QtLocation/QPlaceSupplier>
-#include <QtLocation/QPlaceUser>
-
-#include "../utils/qlocationtestutils_p.h"
-
-QT_USE_NAMESPACE
-
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
-
-class tst_QPlaceReview : public QObject
-{
- Q_OBJECT
-
-public:
- tst_QPlaceReview();
-
-private Q_SLOTS:
- void constructorTest();
- void supplierTest();
- void dateTest();
- void textTest();
- void languageTest();
- void ratingTest();
- void reviewIdTest();
- void titleTest();
- void userTest();
- void operatorsTest();
-};
-
-tst_QPlaceReview::tst_QPlaceReview()
-{
-}
-
-void tst_QPlaceReview::constructorTest()
-{
- QPlaceReview testObj;
- testObj.setLanguage("testId");
- QPlaceReview *testObjPtr = new QPlaceReview(testObj);
- QVERIFY2(testObjPtr != NULL, "Copy constructor - null");
- QVERIFY2(*testObjPtr == testObj, "Copy constructor - compare");
- delete testObjPtr;
-}
-
-void tst_QPlaceReview::supplierTest()
-{
- QPlaceReview testObj;
- QVERIFY2(testObj.supplier().supplierId() == QString(), "Wrong default value");
- QPlaceSupplier sup;
- sup.setName("testName1");
- sup.setSupplierId("testId");
- testObj.setSupplier(sup);
- QVERIFY2(testObj.supplier() == sup, "Wrong value returned");
-}
-
-void tst_QPlaceReview::dateTest()
-{
- QPlaceReview testObj;
- QCOMPARE(testObj.dateTime(), QDateTime());
-
- QDateTime dt = QDateTime::currentDateTime();
- testObj.setDateTime(dt);
- QCOMPARE(testObj.dateTime(), dt);
-}
-
-void tst_QPlaceReview::textTest()
-{
- QPlaceReview testObj;
- QVERIFY2(testObj.text() == QString(), "Wrong default value");
- testObj.setText("testText");
- QVERIFY2(testObj.text() == "testText", "Wrong value returned");
-}
-
-void tst_QPlaceReview::languageTest()
-{
- QPlaceReview testObj;
- QVERIFY2(testObj.language() == QString(), "Wrong default value");
- testObj.setLanguage("testText");
- QVERIFY2(testObj.language() == "testText", "Wrong value returned");
-}
-
-void tst_QPlaceReview::ratingTest()
-{
- QPlaceReview testObj;
- QVERIFY2(testObj.rating() == 0, "Wrong default value");
- testObj.setRating(-10);
- QCOMPARE(testObj.rating(), -10.0);
- testObj.setRating(3.4);
- QCOMPARE(testObj.rating(), 3.4);
-}
-
-void tst_QPlaceReview::operatorsTest()
-{
- QPlaceReview testObj;
- testObj.setText("testValue");
- QPlaceReview testObj2;
- testObj2 = testObj;
- QVERIFY2(testObj == testObj2, "Not copied correctly");
- testObj2.setLanguage("testValue2");
- QVERIFY2(testObj != testObj2, "Object should be different");
-}
-
-void tst_QPlaceReview::reviewIdTest()
-{
- QPlaceReview testObj;
- QVERIFY2(testObj.reviewId() == QString(), "Wrong default value");
- testObj.setReviewId("testText");
- QVERIFY2(testObj.reviewId() == "testText", "Wrong value returned");
-}
-void tst_QPlaceReview::titleTest()
-{
- QPlaceReview testObj;
- QVERIFY2(testObj.title() == QString(), "Wrong default value");
- testObj.setTitle("testText");
- QVERIFY2(testObj.title() == "testText", "Wrong value returned");
-}
-
-void tst_QPlaceReview::userTest()
-{
- QPlaceReview review;
- QVERIFY(review.user().userId().isEmpty());
- QVERIFY(review.user().name().isEmpty());
- QPlaceUser user;
- user.setUserId(QStringLiteral("11111"));
- user.setName(QStringLiteral("Bob"));
-
- review.setUser(user);
- QCOMPARE(review.user().userId(), QStringLiteral("11111"));
- QCOMPARE(review.user().name(), QStringLiteral("Bob"));
-
- review.setUser(QPlaceUser());
- QVERIFY(review.user().userId().isEmpty());
- QVERIFY(review.user().name().isEmpty());
-}
-
-QT_WARNING_POP
-
-QTEST_APPLESS_MAIN(tst_QPlaceReview)
-
-#include "tst_qplacereview.moc"