summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-16 13:05:29 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-23 10:42:39 +0200
commit16b5755de191e6d4f162d6f26b5598a26872fc7a (patch)
tree1a1d0d50e1bb4165754aea4f5b70a610e362fa45
parentd63cd1e09f841e3014d437097eda080e6213beca (diff)
Remove save/remove implementations from Nokia engine
The default implementation returns the special "Unsupported" reply when saving/removing categories or places, and the Nokia implementation did essentially the same thing, setting the UnsupportedError through a queued connection. Change-Id: I5eca2d1efe19f603b0151fc74e2815aba1d9781b Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 45887d30ba78aad8a4e57dcc0c56cd91d842eae8) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--src/plugins/geoservices/nokia/CMakeLists.txt1
-rw-r--r--src/plugins/geoservices/nokia/placesv2/qplaceidreplyimpl.cpp69
-rw-r--r--src/plugins/geoservices/nokia/placesv2/qplaceidreplyimpl.h63
-rw-r--r--src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp2
-rw-r--r--src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp1
-rw-r--r--src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp59
-rw-r--r--src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.h6
7 files changed, 3 insertions, 198 deletions
diff --git a/src/plugins/geoservices/nokia/CMakeLists.txt b/src/plugins/geoservices/nokia/CMakeLists.txt
index 4edabfd6..342d3a31 100644
--- a/src/plugins/geoservices/nokia/CMakeLists.txt
+++ b/src/plugins/geoservices/nokia/CMakeLists.txt
@@ -25,7 +25,6 @@ qt_internal_add_plugin(QGeoServiceProviderFactoryNokiaPlugin
placesv2/qplacecategoriesreplyhere.h placesv2/qplacecategoriesreplyhere.cpp
placesv2/qplacecontentreplyimpl.h placesv2/qplacecontentreplyimpl.cpp
placesv2/qplacedetailsreplyimpl.h placesv2/qplacedetailsreplyimpl.cpp
- placesv2/qplaceidreplyimpl.h placesv2/qplaceidreplyimpl.cpp
placesv2/qplacesearchreplyhere.h placesv2/qplacesearchreplyhere.cpp
placesv2/qplacesearchsuggestionreplyimpl.h placesv2/qplacesearchsuggestionreplyimpl.cpp
placesv2/jsonparserhelpers.h placesv2/jsonparserhelpers.cpp
diff --git a/src/plugins/geoservices/nokia/placesv2/qplaceidreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplaceidreplyimpl.cpp
deleted file mode 100644
index 509c260c..00000000
--- a/src/plugins/geoservices/nokia/placesv2/qplaceidreplyimpl.cpp
+++ /dev/null
@@ -1,69 +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$
-**
-****************************************************************************/
-
-#include "qplaceidreplyimpl.h"
-
-QT_BEGIN_NAMESPACE
-
-QPlaceIdReplyImpl::QPlaceIdReplyImpl(QPlaceIdReply::OperationType type, QObject *parent)
-: QPlaceIdReply(type, parent)
-{
-}
-
-QPlaceIdReplyImpl::~QPlaceIdReplyImpl()
-{
-}
-
-void QPlaceIdReplyImpl::setId(const QString &id)
-{
- QPlaceIdReply::setId(id);
-}
-
-void QPlaceIdReplyImpl::setError(QPlaceReply::Error error_, const QString &errorString)
-{
- if (error_ != QPlaceReply::NoError) {
- QPlaceIdReply::setError(error_, errorString);
- emit errorOccurred(error_, errorString);
- }
-
- setFinished(true);
- emit finished();
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/geoservices/nokia/placesv2/qplaceidreplyimpl.h b/src/plugins/geoservices/nokia/placesv2/qplaceidreplyimpl.h
deleted file mode 100644
index 0fa40497..00000000
--- a/src/plugins/geoservices/nokia/placesv2/qplaceidreplyimpl.h
+++ /dev/null
@@ -1,63 +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 UNSUPPORTED_REPLIES_H
-#define UNSUPPORTED_REPLIES_H
-
-#include <QtLocation/QPlaceIdReply>
-
-QT_BEGIN_NAMESPACE
-
-class QPlaceIdReplyImpl : public QPlaceIdReply
-{
- Q_OBJECT
-
-public:
- QPlaceIdReplyImpl(QPlaceIdReply::OperationType type, QObject *parent = nullptr);
- ~QPlaceIdReplyImpl();
-
- void setId(const QString &id);
-
-private slots:
- void setError(QPlaceReply::Error error_, const QString &errorString);
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp b/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp
index c5bd6f03..4ae9667e 100644
--- a/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeotiledmap_nokia.cpp
@@ -50,6 +50,8 @@
#include <QStaticText>
+#include <QtLocation/private/qgeocameradata_p.h>
+
QT_BEGIN_NAMESPACE
/*
diff --git a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
index 831aad02..1cf7f3d4 100644
--- a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
@@ -54,6 +54,7 @@
#include <QtCore/qstandardpaths.h>
#include <QtPositioning/private/qwebmercator_p.h>
+#include <QtPositioning/private/qdoublevector2d_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
index 14772a9a..9fe0a997 100644
--- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
+++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
@@ -44,7 +44,6 @@
#include "placesv2/qplacesearchsuggestionreplyimpl.h"
#include "placesv2/qplacesearchreplyhere.h"
#include "placesv2/qplacedetailsreplyimpl.h"
-#include "placesv2/qplaceidreplyimpl.h"
#include "qgeonetworkaccessmanager.h"
#include "qgeouriprovider.h"
#include "uri_constants.h"
@@ -544,64 +543,6 @@ QPlaceSearchSuggestionReply *QPlaceManagerEngineNokiaV2::searchSuggestions(const
return reply;
}
-QPlaceIdReply *QPlaceManagerEngineNokiaV2::savePlace(const QPlace &place)
-{
- QPlaceIdReplyImpl *reply = new QPlaceIdReplyImpl(QPlaceIdReply::SavePlace, this);
- reply->setId(place.placeId());
- QMetaObject::invokeMethod(reply, "setError", Qt::QueuedConnection,
- Q_ARG(QPlaceReply::Error, QPlaceReply::UnsupportedError),
- Q_ARG(QString, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, SAVING_PLACE_NOT_SUPPORTED)));
- connect(reply, &QPlaceIdReplyImpl::finished,
- this, &QPlaceManagerEngineNokiaV2::replyFinished);
- connect(reply, &QPlaceIdReplyImpl::errorOccurred,
- this, &QPlaceManagerEngineNokiaV2::replyError);
- return reply;
-}
-
-QPlaceIdReply *QPlaceManagerEngineNokiaV2::removePlace(const QString &placeId)
-{
- QPlaceIdReplyImpl *reply = new QPlaceIdReplyImpl(QPlaceIdReply::RemovePlace, this);
- reply->setId(placeId);
- QMetaObject::invokeMethod(reply, "setError", Qt::QueuedConnection,
- Q_ARG(QPlaceReply::Error, QPlaceReply::UnsupportedError),
- Q_ARG(QString, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, REMOVING_PLACE_NOT_SUPPORTED)));
- connect(reply, &QPlaceIdReplyImpl::finished,
- this, &QPlaceManagerEngineNokiaV2::replyFinished);
- connect(reply, &QPlaceIdReplyImpl::errorOccurred,
- this, &QPlaceManagerEngineNokiaV2::replyError);
- return reply;
-}
-
-QPlaceIdReply *QPlaceManagerEngineNokiaV2::saveCategory(const QPlaceCategory &category, const QString &parentId)
-{
- Q_UNUSED(parentId);
-
- QPlaceIdReplyImpl *reply = new QPlaceIdReplyImpl(QPlaceIdReply::SaveCategory, this);
- reply->setId(category.categoryId());
- QMetaObject::invokeMethod(reply, "setError", Qt::QueuedConnection,
- Q_ARG(QPlaceReply::Error, QPlaceReply::UnsupportedError),
- Q_ARG(QString, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, SAVING_CATEGORY_NOT_SUPPORTED)));
- connect(reply, &QPlaceIdReplyImpl::finished,
- this, &QPlaceManagerEngineNokiaV2::replyFinished);
- connect(reply, &QPlaceIdReplyImpl::errorOccurred,
- this, &QPlaceManagerEngineNokiaV2::replyError);
- return reply;
-}
-
-QPlaceIdReply *QPlaceManagerEngineNokiaV2::removeCategory(const QString &categoryId)
-{
- QPlaceIdReplyImpl *reply = new QPlaceIdReplyImpl(QPlaceIdReply::RemoveCategory, this);
- reply->setId(categoryId);
- QMetaObject::invokeMethod(reply, "setError", Qt::QueuedConnection,
- Q_ARG(QPlaceReply::Error, QPlaceReply::UnsupportedError),
- Q_ARG(QString, QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, REMOVING_CATEGORY_NOT_SUPPORTED)));
- connect(reply, &QPlaceIdReplyImpl::finished,
- this, &QPlaceManagerEngineNokiaV2::replyFinished);
- connect(reply, &QPlaceIdReplyImpl::errorOccurred,
- this, &QPlaceManagerEngineNokiaV2::replyError);
- return reply;
-}
-
QPlaceReply *QPlaceManagerEngineNokiaV2::initializeCategories()
{
if (m_categoryReply)
diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.h b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.h
index 3b0a7d8f..eb7a3eef 100644
--- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.h
+++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.h
@@ -83,12 +83,6 @@ public:
QPlaceSearchSuggestionReply *searchSuggestions(const QPlaceSearchRequest &query) override;
- QPlaceIdReply *savePlace(const QPlace &place) override;
- QPlaceIdReply *removePlace(const QString &placeId) override;
-
- QPlaceIdReply *saveCategory(const QPlaceCategory &category, const QString &parentId) override;
- QPlaceIdReply *removeCategory(const QString &categoryId) override;
-
QPlaceReply *initializeCategories() override;
QString parentCategoryId(const QString &categoryId) const override;
QStringList childCategoryIds(const QString &categoryId) const override;