diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..05a0e946187b8160d0c54c23a9f8100f44e0f43b --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.xz filter=lfs diff=lfs merge=lfs -text diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000000000000000000000000000000000000..379e78a3a3328918b5fa05555afb33c3f9c94a15 --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://artlfs.openeuler.openatom.cn/src-openEuler/qt5-qtlocation diff --git a/0001-Fix-appendChildNode-call.patch b/0001-Fix-appendChildNode-call.patch new file mode 100644 index 0000000000000000000000000000000000000000..1ac76297ff169ca2c482dcfa5826d6ae58437c07 --- /dev/null +++ b/0001-Fix-appendChildNode-call.patch @@ -0,0 +1,25 @@ +From 76e86dc9ff08a8bcf4c94014933cc1f362cd36b1 Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Tue, 22 Mar 2022 22:42:58 +0000 +Subject: [PATCH 1/7] Fix appendChildNode() call + +--- + src/location/labs/qsg/qgeomapobjectqsgsupport.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/location/labs/qsg/qgeomapobjectqsgsupport.cpp b/src/location/labs/qsg/qgeomapobjectqsgsupport.cpp +index a978573d..11e1466f 100644 +--- a/src/location/labs/qsg/qgeomapobjectqsgsupport.cpp ++++ b/src/location/labs/qsg/qgeomapobjectqsgsupport.cpp +@@ -158,7 +158,7 @@ void QGeoMapObjectQSGSupport::updateMapObjects(QSGNode *root, QQuickWindow *wind + if (!root) + return; + +- if (m_mapObjectsRootNode && m_mapObjectsRootNode->parent()) ++ if (m_mapObjectsRootNode && !m_mapObjectsRootNode->parent()) + root->appendChildNode(m_mapObjectsRootNode.get()); + + if (!m_mapObjectsRootNode) { +-- +2.47.1 + diff --git a/0005-Fix-build-of-Qt.labs.location-QML-plugin.patch b/0005-Fix-build-of-Qt.labs.location-QML-plugin.patch new file mode 100644 index 0000000000000000000000000000000000000000..2c37dc1ec6b79c3a3b07f02339dc34d6baa86d05 --- /dev/null +++ b/0005-Fix-build-of-Qt.labs.location-QML-plugin.patch @@ -0,0 +1,26 @@ +From 0359efc82f0330f801b6771db88bf84896392823 Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Thu, 17 Mar 2022 18:40:27 +0100 +Subject: [PATCH 5/7] Fix build of Qt.labs.location QML plugin + +Should be conditional on "features.opengl", not on "config.opengl" +--- + src/location/configure.json | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/location/configure.json b/src/location/configure.json +index 6d01a9a3..d1e623a1 100644 +--- a/src/location/configure.json ++++ b/src/location/configure.json +@@ -9,7 +9,7 @@ + "label": "Qt.labs.location experimental QML plugin", + "purpose": "Provides experimental QtLocation QML types", + "section": "Location", +- "condition": "config.opengl", ++ "condition": "features.opengl", + "output": [ "privateFeature" ] + }, + "geoservices_osm": { +-- +2.47.1 + diff --git a/0006-Fix-HereMap-plugin-not-supporting-authentication-via.patch b/0006-Fix-HereMap-plugin-not-supporting-authentication-via.patch new file mode 100644 index 0000000000000000000000000000000000000000..b8b7ae45061e00130087473a86d80d1aa793dcc8 --- /dev/null +++ b/0006-Fix-HereMap-plugin-not-supporting-authentication-via.patch @@ -0,0 +1,452 @@ +From 2a46effe1ef9302e3dfa33700ef95863baa91c35 Mon Sep 17 00:00:00 2001 +From: Lorenzo Lucignano +Date: Mon, 23 Oct 2023 09:50:49 +0200 +Subject: [PATCH 6/7] Fix HereMap plugin not supporting authentication via + apiKey + +The authentication of the Here services no longer supports app id and token. +Authentication is now done via apiKey string and using https. +The change fixes also the generation of subdomain urls in QGeoUriProvider. + +Fixes: QTBUG-118447 +Pick-to: 6.6 6.5 5.15 +Change-Id: I6e7e8b18cd0456963ab89feeaa8bfda136c14c43 +Reviewed-by: Qt CI Bot +Reviewed-by: Volker Hilsheimer +(cherry picked from commit fab72389e13921602cffb2b698d1d2415b70372f) +--- + .../nokia/qgeocodingmanagerengine_nokia.cpp | 16 ++---- + .../nokia/qgeocodingmanagerengine_nokia.h | 3 +- + .../geoservices/nokia/qgeoerror_messages.cpp | 2 +- + .../nokia/qgeoroutingmanagerengine_nokia.cpp | 15 +++--- + .../nokia/qgeoroutingmanagerengine_nokia.h | 3 +- + .../nokia/qgeoserviceproviderplugin_nokia.cpp | 15 ++---- + .../nokia/qgeotilefetcher_nokia.cpp | 49 ++++++------------- + .../geoservices/nokia/qgeotilefetcher_nokia.h | 6 +-- + .../geoservices/nokia/qgeouriprovider.cpp | 2 +- + .../nokia/qplacemanagerengine_nokiav2.cpp | 20 ++++---- + .../nokia/qplacemanagerengine_nokiav2.h | 3 +- + .../geoservices/nokia/uri_constants.cpp | 12 ++--- + 12 files changed, 53 insertions(+), 93 deletions(-) + +diff --git a/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp +index 68b2429e..deef29f9 100644 +--- a/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp ++++ b/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp +@@ -66,11 +66,8 @@ QGeoCodingManagerEngineNokia::QGeoCodingManagerEngineNokia( + Q_ASSERT(networkManager); + m_networkManager->setParent(this); + +- if (parameters.contains(QStringLiteral("here.token"))) +- m_token = parameters.value(QStringLiteral("here.token")).toString(); +- +- if (parameters.contains(QStringLiteral("here.app_id"))) +- m_applicationId = parameters.value(QStringLiteral("here.app_id")).toString(); ++ if (parameters.contains(QStringLiteral("here.apiKey"))) ++ m_apiKey = parameters.value(QStringLiteral("here.apiKey")).toString(); + + if (error) + *error = QGeoServiceProvider::NoError; +@@ -85,12 +82,9 @@ QString QGeoCodingManagerEngineNokia::getAuthenticationString() const + { + QString authenticationString; + +- if (!m_token.isEmpty() && !m_applicationId.isEmpty()) { +- authenticationString += "?app_code="; +- authenticationString += m_token; +- +- authenticationString += "&app_id="; +- authenticationString += m_applicationId; ++ if (!m_apiKey.isEmpty()) { ++ authenticationString += "?apiKey="; ++ authenticationString += m_apiKey; + } + + return authenticationString; +diff --git a/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.h b/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.h +index 9e1564aa..a7cfd06a 100644 +--- a/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.h ++++ b/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.h +@@ -82,8 +82,7 @@ private: + QGeoNetworkAccessManager *m_networkManager; + QGeoUriProvider *m_uriProvider; + QGeoUriProvider *m_reverseGeocodingUriProvider; +- QString m_token; +- QString m_applicationId; ++ QString m_apiKey; + }; + + QT_END_NAMESPACE +diff --git a/src/plugins/geoservices/nokia/qgeoerror_messages.cpp b/src/plugins/geoservices/nokia/qgeoerror_messages.cpp +index 576ecd43..f49e0905 100644 +--- a/src/plugins/geoservices/nokia/qgeoerror_messages.cpp ++++ b/src/plugins/geoservices/nokia/qgeoerror_messages.cpp +@@ -39,7 +39,7 @@ + QT_BEGIN_NAMESPACE + + const char NOKIA_PLUGIN_CONTEXT_NAME[] = "QtLocationQML"; +-const char MISSED_CREDENTIALS[] = QT_TRANSLATE_NOOP("QtLocationQML", "Qt Location requires app_id and token parameters.\nPlease register at https://developer.here.com/ to get your personal application credentials."); ++const char MISSED_CREDENTIALS[] = QT_TRANSLATE_NOOP("QtLocationQML", "Qt Location requires apiKey parameter.\nPlease register at https://developer.here.com/ to get your personal application credentials."); + const char SAVING_PLACE_NOT_SUPPORTED[] = QT_TRANSLATE_NOOP("QtLocationQML", "Saving places is not supported."); + const char REMOVING_PLACE_NOT_SUPPORTED[] = QT_TRANSLATE_NOOP("QtLocationQML", "Removing places is not supported."); + const char SAVING_CATEGORY_NOT_SUPPORTED[] = QT_TRANSLATE_NOOP("QtLocationQML", "Saving categories is not supported."); +diff --git a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp +index 73b998b1..a938096b 100644 +--- a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp ++++ b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp +@@ -60,8 +60,7 @@ QGeoRoutingManagerEngineNokia::QGeoRoutingManagerEngineNokia( + Q_ASSERT(networkManager); + m_networkManager->setParent(this); + +- m_appId = parameters.value(QStringLiteral("here.app_id")).toString(); +- m_token = parameters.value(QStringLiteral("here.token")).toString(); ++ m_apiKey = parameters.value(QStringLiteral("here.apiKey")).toString(); + + QGeoRouteRequest::FeatureTypes featureTypes; + featureTypes |= QGeoRouteRequest::TollFeature; +@@ -219,18 +218,16 @@ QStringList QGeoRoutingManagerEngineNokia::calculateRouteRequestString(const QGe + return QStringList(); + QStringList requests; + +- QString baseRequest = QStringLiteral("http://"); ++ QString baseRequest = QStringLiteral("https://"); + baseRequest += m_uriProvider->getCurrentHost(); + baseRequest += QStringLiteral("/routing/7.2/calculateroute.xml"); + + baseRequest += QStringLiteral("?alternatives="); + baseRequest += QString::number(request.numberAlternativeRoutes()); + +- if (!m_appId.isEmpty() && !m_token.isEmpty()) { +- baseRequest += QStringLiteral("&app_id="); +- baseRequest += m_appId; +- baseRequest += QStringLiteral("&token="); +- baseRequest += m_token; ++ if (!m_apiKey.isEmpty()) { ++ baseRequest += QStringLiteral("&apiKey="); ++ baseRequest += m_apiKey; + } + + const QList metadata = request.waypointsMetadata(); +@@ -281,7 +278,7 @@ QStringList QGeoRoutingManagerEngineNokia::updateRouteRequestString(const QGeoRo + return QStringList(); + QStringList requests; + +- QString baseRequest = "http://"; ++ QString baseRequest = "https://"; + baseRequest += m_uriProvider->getCurrentHost(); + baseRequest += "/routing/7.2/getroute.xml"; + +diff --git a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.h b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.h +index 9335bcac..67fb5825 100644 +--- a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.h ++++ b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.h +@@ -77,8 +77,7 @@ private: + + QGeoNetworkAccessManager *m_networkManager; + QGeoUriProvider *m_uriProvider; +- QString m_appId; +- QString m_token; ++ QString m_apiKey; + }; + + QT_END_NAMESPACE +diff --git a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp +index e4ef86d6..2c53dd16 100644 +--- a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp ++++ b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp +@@ -75,20 +75,15 @@ namespace + + void checkUsageTerms(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) + { +- QString appId, token; ++ const QString apiKey = parameters.value(QStringLiteral("here.apiKey")).toString(); + +- appId = parameters.value(QStringLiteral("here.app_id")).toString(); +- token = parameters.value(QStringLiteral("here.token")).toString(); +- +- if (isValidParameter(appId) && isValidParameter(token)) ++ if (isValidParameter(apiKey)) + return; +- else if (!isValidParameter(appId)) +- qWarning() << "Invalid here.app_id"; + else +- qWarning() << "Invalid here.token"; ++ qWarning() << "Invalid here.apiKey"; + +- if (parameters.contains(QStringLiteral("app_id")) || parameters.contains(QStringLiteral("token"))) +- qWarning() << QStringLiteral("Please prefix 'app_id' and 'token' with prefix 'here' (e.g.: 'here.app_id')"); ++ if (parameters.contains(QStringLiteral("apiKey"))) ++ qWarning() << QStringLiteral("Please prefix 'apiKey' with prefix 'here' (e.g.: 'here.apiKey')"); + + *error = QGeoServiceProvider::MissingRequiredParameterError; + *errorString = QCoreApplication::translate(NOKIA_PLUGIN_CONTEXT_NAME, MISSED_CREDENTIALS); +diff --git a/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp b/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp +index d07a93ba..4cfd62f8 100644 +--- a/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp ++++ b/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.cpp +@@ -84,8 +84,7 @@ QGeoTileFetcherNokia::QGeoTileFetcherNokia(const QVariantMap ¶meters, + m_tileSize = qMax(tileSize.width(), tileSize.height()); + m_networkManager->setParent(this); + +- m_applicationId = parameters.value(QStringLiteral("here.app_id")).toString(); +- m_token = parameters.value(QStringLiteral("here.token")).toString(); ++ m_apiKey = parameters.value(QStringLiteral("here.apiKey")).toString(); + } + + QGeoTileFetcherNokia::~QGeoTileFetcherNokia() +@@ -127,7 +126,7 @@ QString QGeoTileFetcherNokia::getRequestString(const QGeoTileSpec &spec, int ppi + if (!m_engineNokia) + return QString(); + +- static const QString http("http://"); ++ static const QString http("https://"); + static const QString path("/maptile/2.1/maptile/newest/"); + static const QChar slash('/'); + +@@ -152,12 +151,9 @@ QString QGeoTileFetcherNokia::getRequestString(const QGeoTileSpec &spec, int ppi + static const QString slashpng("/png8"); + requestString += slashpng; + +- if (!m_token.isEmpty() && !m_applicationId.isEmpty()) { // TODO: remove the if +- requestString += "?token="; +- requestString += m_token; +- +- requestString += "&app_id="; +- requestString += m_applicationId; ++ if (!m_apiKey.isEmpty()) { // TODO: remove the if ++ requestString += "?apiKey="; ++ requestString += m_apiKey; + } + + requestString += "&ppi=" + QString::number(ppi); +@@ -235,14 +231,9 @@ QString QGeoTileFetcherNokia::getLanguageString() const + // No "lg" param means that we want English. + } + +-QString QGeoTileFetcherNokia::token() const ++QString QGeoTileFetcherNokia::apiKey() const + { +- return m_token; +-} +- +-QString QGeoTileFetcherNokia::applicationId() const +-{ +- return m_applicationId; ++ return m_apiKey; + } + + void QGeoTileFetcherNokia::copyrightsFetched() +@@ -271,19 +262,14 @@ void QGeoTileFetcherNokia::versionFetched() + + void QGeoTileFetcherNokia::fetchCopyrightsData() + { +- QString copyrightUrl = QStringLiteral("http://"); ++ QString copyrightUrl = QStringLiteral("https://"); + + copyrightUrl += m_baseUriProvider->getCurrentHost(); + copyrightUrl += QStringLiteral("/maptile/2.1/copyright/newest?output=json"); + +- if (!token().isEmpty()) { +- copyrightUrl += QStringLiteral("&token="); +- copyrightUrl += token(); +- } +- +- if (!applicationId().isEmpty()) { +- copyrightUrl += QStringLiteral("&app_id="); +- copyrightUrl += applicationId(); ++ if (!apiKey().isEmpty()) { ++ copyrightUrl += QStringLiteral("&apiKey="); ++ copyrightUrl += apiKey(); + } + + QNetworkRequest netRequest((QUrl(copyrightUrl))); +@@ -303,19 +289,14 @@ void QGeoTileFetcherNokia::fetchCopyrightsData() + + void QGeoTileFetcherNokia::fetchVersionData() + { +- QString versionUrl = QStringLiteral("http://"); ++ QString versionUrl = QStringLiteral("https://"); + + versionUrl += m_baseUriProvider->getCurrentHost(); + versionUrl += QStringLiteral("/maptile/2.1/version"); + +- if (!token().isEmpty()) { +- versionUrl += QStringLiteral("?token="); +- versionUrl += token(); +- } +- +- if (!applicationId().isEmpty()) { +- versionUrl += QStringLiteral("&app_id="); +- versionUrl += applicationId(); ++ if (!apiKey().isEmpty()) { ++ versionUrl += QStringLiteral("?apiKey="); ++ versionUrl += apiKey(); + } + + QNetworkRequest netRequest((QUrl(versionUrl))); +diff --git a/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.h b/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.h +index 06d1bba9..ee0cb0e9 100644 +--- a/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.h ++++ b/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.h +@@ -62,8 +62,7 @@ public: + + QGeoTiledMapReply *getTileImage(const QGeoTileSpec &spec); + +- QString token() const; +- QString applicationId() const; ++ QString apiKey() const; + + public Q_SLOTS: + void copyrightsFetched(); +@@ -82,11 +81,10 @@ private: + QGeoNetworkAccessManager *m_networkManager; + int m_tileSize; + int m_ppi; +- QString m_token; + QNetworkReply *m_copyrightsReply; + QNetworkReply *m_versionReply; + +- QString m_applicationId; ++ QString m_apiKey; + QGeoUriProvider *m_baseUriProvider; + QGeoUriProvider *m_aerialUriProvider; + }; +diff --git a/src/plugins/geoservices/nokia/qgeouriprovider.cpp b/src/plugins/geoservices/nokia/qgeouriprovider.cpp +index 7be90bb2..6a4f6986 100644 +--- a/src/plugins/geoservices/nokia/qgeouriprovider.cpp ++++ b/src/plugins/geoservices/nokia/qgeouriprovider.cpp +@@ -61,7 +61,7 @@ QGeoUriProvider::QGeoUriProvider( + QString QGeoUriProvider::getCurrentHost() const + { + if (m_maxSubdomains) { +- QString result(m_firstSubdomain.toLatin1() + QRandomGenerator::global()->bounded(m_maxSubdomains)); ++ QString result(static_cast(m_firstSubdomain.toLatin1() + QRandomGenerator::global()->bounded(m_maxSubdomains))); + result += '.' + m_currentHost; + return result; + } +diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp +index c5c05a2e..4c6e9774 100644 +--- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp ++++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp +@@ -208,8 +208,7 @@ QPlaceManagerEngineNokiaV2::QPlaceManagerEngineNokiaV2( + + m_locales.append(QLocale()); + +- m_appId = parameters.value(QStringLiteral("here.app_id")).toString(); +- m_appCode = parameters.value(QStringLiteral("here.token")).toString(); ++ m_apiKey = parameters.value(QStringLiteral("here.apiKey")).toString(); + + m_theme = parameters.value(IconThemeKey, QString()).toString(); + +@@ -237,7 +236,7 @@ QPlaceManagerEngineNokiaV2::~QPlaceManagerEngineNokiaV2() {} + + QPlaceDetailsReply *QPlaceManagerEngineNokiaV2::getPlaceDetails(const QString &placeId) + { +- QUrl requestUrl(QString::fromLatin1("http://") + m_uriProvider->getCurrentHost() + ++ QUrl requestUrl(QString::fromLatin1("https://") + m_uriProvider->getCurrentHost() + + QStringLiteral("/places/v1/places/") + placeId); + + QUrlQuery queryItems; +@@ -268,7 +267,7 @@ QPlaceContentReply *QPlaceManagerEngineNokiaV2::getPlaceContent(const QPlaceCont + + networkReply = sendRequest(u); + } else { +- QUrl requestUrl(QString::fromLatin1("http://") + m_uriProvider->getCurrentHost() + ++ QUrl requestUrl(QString::fromLatin1("https://") + m_uriProvider->getCurrentHost() + + QStringLiteral("/places/v1/places/") + request.placeId() + + QStringLiteral("/media/")); + +@@ -410,7 +409,7 @@ QPlaceSearchReply *QPlaceManagerEngineNokiaV2::search(const QPlaceSearchRequest + networkReply = sendRequest(u); + } else if (!query.searchTerm().isEmpty()) { + // search term query +- QUrl requestUrl(QString::fromLatin1("http://") + m_uriProvider->getCurrentHost() + ++ QUrl requestUrl(QString::fromLatin1("https://") + m_uriProvider->getCurrentHost() + + QStringLiteral("/places/v1/discover/search")); + + queryItems.addQueryItem(QStringLiteral("q"), query.searchTerm()); +@@ -432,7 +431,7 @@ QPlaceSearchReply *QPlaceManagerEngineNokiaV2::search(const QPlaceSearchRequest + + return reply; + } else if (!query.recommendationId().isEmpty()) { +- QUrl requestUrl(QString::fromLatin1("http://") + m_uriProvider->getCurrentHost() + ++ QUrl requestUrl(QString::fromLatin1("https://") + m_uriProvider->getCurrentHost() + + QStringLiteral("/places/v1/places/") + query.recommendationId() + + QStringLiteral("/related/recommended")); + +@@ -443,7 +442,7 @@ QPlaceSearchReply *QPlaceManagerEngineNokiaV2::search(const QPlaceSearchRequest + networkReply = sendRequest(requestUrl); + } else { + // category search +- QUrl requestUrl(QStringLiteral("http://") + m_uriProvider->getCurrentHost() + ++ QUrl requestUrl(QStringLiteral("https://") + m_uriProvider->getCurrentHost() + + QStringLiteral("/places/v1/discover/explore")); + + QStringList ids; +@@ -498,7 +497,7 @@ QPlaceSearchSuggestionReply *QPlaceManagerEngineNokiaV2::searchSuggestions(const + return reply; + } + +- QUrl requestUrl(QString::fromLatin1("http://") + m_uriProvider->getCurrentHost() + ++ QUrl requestUrl(QString::fromLatin1("https://") + m_uriProvider->getCurrentHost() + + QStringLiteral("/places/v1/suggest")); + + QUrlQuery queryItems; +@@ -633,7 +632,7 @@ QPlaceReply *QPlaceManagerEngineNokiaV2::initializeCategories() + for (auto it = m_tempTree.keyBegin(), end = m_tempTree.keyEnd(); it != end; ++it) { + if (*it == QString()) + continue; +- QUrl requestUrl(QString::fromLatin1("http://") + m_uriProvider->getCurrentHost() + ++ QUrl requestUrl(QString::fromLatin1("https://") + m_uriProvider->getCurrentHost() + + QStringLiteral("/places/v1/categories/places/") + *it); + QNetworkReply *networkReply = sendRequest(requestUrl); + connect(networkReply, SIGNAL(finished()), this, SLOT(categoryReplyFinished())); +@@ -831,8 +830,7 @@ void QPlaceManagerEngineNokiaV2::categoryReplyError() + QNetworkReply *QPlaceManagerEngineNokiaV2::sendRequest(const QUrl &url) + { + QUrlQuery queryItems(url); +- queryItems.addQueryItem(QStringLiteral("app_id"), m_appId); +- queryItems.addQueryItem(QStringLiteral("app_code"), m_appCode); ++ queryItems.addQueryItem(QStringLiteral("apiKey"), m_apiKey); + + QUrl requestUrl = url; + requestUrl.setQuery(queryItems); +diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.h b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.h +index cd632958..6784ce4f 100644 +--- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.h ++++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.h +@@ -122,8 +122,7 @@ private: + QPointer m_categoryReply; + QHash m_categoryRequests; + +- QString m_appId; +- QString m_appCode; ++ QString m_apiKey; + + QString m_localDataPath; + QString m_theme; +diff --git a/src/plugins/geoservices/nokia/uri_constants.cpp b/src/plugins/geoservices/nokia/uri_constants.cpp +index 8db47beb..030006f5 100644 +--- a/src/plugins/geoservices/nokia/uri_constants.cpp ++++ b/src/plugins/geoservices/nokia/uri_constants.cpp +@@ -37,11 +37,11 @@ + + QT_BEGIN_NAMESPACE + +-const QString ROUTING_HOST = QLatin1String("route.api.here.com"); +-const QString GEOCODING_HOST = QLatin1String("geocoder.api.here.com"); +-const QString REVERSE_GEOCODING_HOST = QLatin1String("reverse.geocoder.api.here.com"); +-const QString PLACES_HOST = QLatin1String("places.api.here.com"); +-const QString MAP_TILES_HOST = QLatin1String("1-4.base.maps.api.here.com"); +-const QString MAP_TILES_HOST_AERIAL = QLatin1String("1-4.aerial.maps.api.here.com"); ++const QString ROUTING_HOST = QLatin1String("route.ls.hereapi.com"); ++const QString GEOCODING_HOST = QLatin1String("geocoder.ls.hereapi.com"); ++const QString REVERSE_GEOCODING_HOST = QLatin1String("reverse.geocoder.ls.hereapi.com"); ++const QString PLACES_HOST = QLatin1String("places.ls.hereapi.com"); ++const QString MAP_TILES_HOST = QLatin1String("1-4.base.maps.ls.hereapi.com"); ++const QString MAP_TILES_HOST_AERIAL = QLatin1String("1-4.aerial.maps.ls.hereapi.com"); + + QT_END_NAMESPACE +-- +2.47.1 + diff --git a/0100-Add-some-missing-cstdint-inclusions-872.patch b/0100-Add-some-missing-cstdint-inclusions-872.patch new file mode 100644 index 0000000000000000000000000000000000000000..a970fff5a259bd1a7d431ad94df8714499b49ee2 --- /dev/null +++ b/0100-Add-some-missing-cstdint-inclusions-872.patch @@ -0,0 +1,52 @@ +From d8054f1efa0b97b291a6f8c7fff9090b0fd4328e Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Fri, 3 Mar 2023 11:39:58 +0100 +Subject: [PATCH 100/104] Add some missing cstdint inclusions (#872) + +GCC 13 removed some indirect inclusions of cstdint which this relied on. +Include it explicitly to fix build errors. +--- + include/mbgl/util/geometry.hpp | 2 ++ + include/mbgl/util/string.hpp | 1 + + src/mbgl/gl/stencil_mode.hpp | 2 ++ + 3 files changed, 5 insertions(+) + +diff --git a/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp b/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp +index a28c59a47..283ec7dbb 100644 +--- a/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp ++++ b/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp +@@ -1,5 +1,7 @@ + #pragma once + ++#include ++ + #include + #include + #include +diff --git a/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp b/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp +index 13498ccb9..2f6acb641 100644 +--- a/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp ++++ b/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp +@@ -3,6 +3,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp b/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp +index bc959c9a7..fd00370f8 100644 +--- a/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp ++++ b/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp +@@ -1,5 +1,7 @@ + #pragma once + ++#include ++ + #include + + namespace mbgl { +-- +2.47.1 + diff --git a/0101-Add-missing-include.patch b/0101-Add-missing-include.patch new file mode 100644 index 0000000000000000000000000000000000000000..76db1f1cd9aa0efeabbda40c1fe6f0525194f3cd --- /dev/null +++ b/0101-Add-missing-include.patch @@ -0,0 +1,26 @@ +From 5a07e1967dcc925d9def47accadae991436b9686 Mon Sep 17 00:00:00 2001 +From: Manuel Nickschas +Date: Tue, 11 Apr 2023 22:24:11 +0200 +Subject: [PATCH 101/104] Add missing include + +Fixes build with libcxx, see also: +https://bugs.gentoo.org/903575 +--- + include/mbgl/util/unique_any.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp b/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp +index c7dc8b38e..0fb25b8b4 100644 +--- a/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp ++++ b/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp +@@ -3,6 +3,7 @@ + #include + #include + #include ++#include + namespace mbgl { + namespace util { + +-- +2.47.1 + diff --git a/0102-Removed-non-compiling-assignment-operator.-Fixed-718.patch b/0102-Removed-non-compiling-assignment-operator.-Fixed-718.patch new file mode 100644 index 0000000000000000000000000000000000000000..db79bae5fba7c9e833cd075bb927cd7259bf8223 --- /dev/null +++ b/0102-Removed-non-compiling-assignment-operator.-Fixed-718.patch @@ -0,0 +1,32 @@ +From 0d9987b43e695f5202c5d69a5e42ab70a678b04f Mon Sep 17 00:00:00 2001 +From: Janusz Chorko +Date: Fri, 26 Aug 2016 21:17:38 +0200 +Subject: [PATCH 102/104] Removed non-compiling assignment operator. Fixed #718 + +Downstream report: https://bugs.gentoo.org/914581 + +See also: +https://github.com/Tencent/rapidjson/issues/718 + +Signed-off-by: Andreas Sturmlechner +(cherry-picked from rapidjson upstream commit 3b2441b87f99ab65f37b141a7b548ebadb607b96) +--- + deps/rapidjson/1.1.0/include/rapidjson/document.h | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/3rdparty/mapbox-gl-native/deps/rapidjson/1.1.0/include/rapidjson/document.h b/src/3rdparty/mapbox-gl-native/deps/rapidjson/1.1.0/include/rapidjson/document.h +index e3e20dfbd..b0f1f70be 100644 +--- a/src/3rdparty/mapbox-gl-native/deps/rapidjson/1.1.0/include/rapidjson/document.h ++++ b/src/3rdparty/mapbox-gl-native/deps/rapidjson/1.1.0/include/rapidjson/document.h +@@ -316,8 +316,6 @@ struct GenericStringRef { + + GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {} + +- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } +- + //! implicit conversion to plain CharType pointer + operator const Ch *() const { return s; } + +-- +2.47.1 + diff --git a/0103-Explicitly-disable-copy-assignment-operator.patch b/0103-Explicitly-disable-copy-assignment-operator.patch new file mode 100644 index 0000000000000000000000000000000000000000..10415bbe3d513afdd26df323c69e90c21b0cd9ed --- /dev/null +++ b/0103-Explicitly-disable-copy-assignment-operator.patch @@ -0,0 +1,30 @@ +From 4c88f2c0e61daa89f584a8a9a3eba210221c6920 Mon Sep 17 00:00:00 2001 +From: Janusz Chorko +Date: Fri, 26 Aug 2016 21:26:50 +0200 +Subject: [PATCH 103/104] Explicitly disable copy assignment operator + +See also: +https://github.com/Tencent/rapidjson/pull/719 + +Signed-off-by: Andreas Sturmlechner +(cherry-picked from rapidjson upstream commit 862c39be371278a45a88d4d1d75164be57bb7e2d) +--- + deps/rapidjson/1.1.0/include/rapidjson/document.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/3rdparty/mapbox-gl-native/deps/rapidjson/1.1.0/include/rapidjson/document.h b/src/3rdparty/mapbox-gl-native/deps/rapidjson/1.1.0/include/rapidjson/document.h +index b0f1f70be..19f5a6a5f 100644 +--- a/src/3rdparty/mapbox-gl-native/deps/rapidjson/1.1.0/include/rapidjson/document.h ++++ b/src/3rdparty/mapbox-gl-native/deps/rapidjson/1.1.0/include/rapidjson/document.h +@@ -326,6 +326,8 @@ private: + //! Disallow construction from non-const array + template + GenericStringRef(CharType (&str)[N]) /* = delete */; ++ //! Copy assignment operator not permitted - immutable type ++ GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */; + }; + + //! Mark a character pointer as constant string +-- +2.47.1 + diff --git a/0104-Fix-build-with-ICU-75.patch b/0104-Fix-build-with-ICU-75.patch new file mode 100644 index 0000000000000000000000000000000000000000..3927ab37059331dca430bc580a66d0b58341395f --- /dev/null +++ b/0104-Fix-build-with-ICU-75.patch @@ -0,0 +1,26 @@ +From 35d566724c48180c9a372c2ed50a253871a51574 Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Thu, 9 May 2024 23:37:15 +0000 +Subject: [PATCH 104/104] Fix build with ICU 75 + +--- + mapbox-gl-native.pro | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/3rdparty/mapbox-gl-native/mapbox-gl-native.pro b/src/3rdparty/mapbox-gl-native/mapbox-gl-native.pro +index ed974db77..4d5835d73 100644 +--- a/src/3rdparty/mapbox-gl-native/mapbox-gl-native.pro ++++ b/src/3rdparty/mapbox-gl-native/mapbox-gl-native.pro +@@ -2,8 +2,7 @@ TARGET = qmapboxgl + + load(qt_helper_lib) + +-CONFIG += qt c++14 exceptions warn_off staticlib object_parallel_to_source +-CONFIG -= c++1z ++CONFIG += qt c++17 exceptions warn_off staticlib object_parallel_to_source + + QT += network-private \ + gui-private \ +-- +2.47.1 + diff --git a/qt5-qtlocation.spec b/qt5-qtlocation.spec index 655da326b973bf271ec13d88c93602c1d378c204..4002b35a67c8a057ea6fc4ee88e8fa12fc4efa27 100644 --- a/qt5-qtlocation.spec +++ b/qt5-qtlocation.spec @@ -2,17 +2,27 @@ Summary: Qt5 - Location component Name: qt5-%{qt_module} -Version: 5.15.10 -Release: 2 +Version: 5.15.16 +Release: 1 License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0 -Url: http://www.qt.io +Url: https://www.qt.io %global majmin %(echo %{version} | cut -d. -f1-2) Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/%{qt_module}-everywhere-opensource-src-%{version}.tar.xz -Patch0: qtlocation-gcc10.patch -# https://invent.kde.org/qt/qt/qtlocation-mapboxgl/-/commit/35d566724c48180c9a372c2ed50a253871a51574 -Patch1: qtlocation-icu-75.patch +## upstream patches +## repo: https://invent.kde.org/qt/qt/qtlocation +## branch: kde/5.15 +## git format-patch v5.15.16-lts-lgpl +Patch1: 0001-Fix-appendChildNode-call.patch +Patch5: 0005-Fix-build-of-Qt.labs.location-QML-plugin.patch +Patch6: 0006-Fix-HereMap-plugin-not-supporting-authentication-via.patch + +Patch100: 0100-Add-some-missing-cstdint-inclusions-872.patch +Patch101: 0101-Add-missing-include.patch +Patch102: 0102-Removed-non-compiling-assignment-operator.-Fixed-718.patch +Patch103: 0103-Explicitly-disable-copy-assignment-operator.patch +Patch104: 0104-Fix-build-with-ICU-75.patch # filter plugin/qml provides %global __provides_exclude_from ^(%{_qt5_archdatadir}/qml/.*\\.so|%{_qt5_plugindir}/.*\\.so)$ @@ -36,7 +46,8 @@ satellite, or wifi, or text file, and so on. %package devel Summary: Development files provided for qt5-qtlocation -Requires: %{name} = %{version}-%{release} qt5-qtbase-devel +Requires: %{name} = %{version}-%{release} +Requires: qt5-qtbase-devel >= %{version} %description devel %{summary}. @@ -53,10 +64,10 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %build %{qmake_qt5} -%make_build +%qmake_qt5_build %install -%make_install INSTALL_ROOT=%{buildroot} +%qmake_qt5_install ## .prl/.la file love # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs @@ -70,9 +81,6 @@ for prl_file in libQt5*.prl ; do done popd - -%ldconfig_scriptlets - %files %license LICENSE.GPL* LICENSE.LGPL* %{_qt5_libdir}/libQt5Location.so.5* @@ -106,13 +114,15 @@ popd %{_qt5_libdir}/pkgconfig/Qt5PositioningQuick.pc %dir %{_qt5_libdir}/cmake/Qt5PositioningQuick/ %{_qt5_libdir}/cmake/Qt5PositioningQuick/Qt5PositioningQuick*.cmake -%{_qt5_archdatadir}/mkspecs/modules/qt_lib_positioning*.pri %files examples %{_qt5_examplesdir}/ %changelog +* Thu Apr 10 2025 Funda Wang - 5.15.16-1 +- update to 5.15.16 + * Fri Nov 01 2024 Funda Wang - 5.15.10-2 - fix build with icu 75 diff --git a/qtlocation-everywhere-opensource-src-5.15.10.tar.xz b/qtlocation-everywhere-opensource-src-5.15.10.tar.xz deleted file mode 100644 index 762f5537f26673fd3973aa4cd4495535d193c3d8..0000000000000000000000000000000000000000 Binary files a/qtlocation-everywhere-opensource-src-5.15.10.tar.xz and /dev/null differ diff --git a/qtlocation-everywhere-opensource-src-5.15.16.tar.xz b/qtlocation-everywhere-opensource-src-5.15.16.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..ef29a69a0fc30d751a6599e0caee39611d45325b --- /dev/null +++ b/qtlocation-everywhere-opensource-src-5.15.16.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33061c9b3ebab673d0ac6b1e014b7b139c9ec9fa6049c05c711487de69b65c87 +size 6548480 diff --git a/qtlocation-gcc10.patch b/qtlocation-gcc10.patch deleted file mode 100644 index fdb96e610d28f3324ca862f0798f55e1caf2157c..0000000000000000000000000000000000000000 --- a/qtlocation-gcc10.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/src/3rdparty/mapbox-gl-native/platform/qt/src/bidi.cpp b/src/3rdparty/mapbox-gl-native/platform/qt/src/bidi.cpp -index b75d038..b367ee6 100644 ---- a/src/3rdparty/mapbox-gl-native/platform/qt/src/bidi.cpp -+++ b/src/3rdparty/mapbox-gl-native/platform/qt/src/bidi.cpp -@@ -3,6 +3,7 @@ - #include - - #include -+#include - - namespace mbgl { - -diff -up qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp.me qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp ---- qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp.me 2023-02-20 14:49:09.397384737 +0100 -+++ qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp 2023-02-20 14:50:09.654502801 +0100 -@@ -1,5 +1,7 @@ - #pragma once - -+#include -+ - #include - #include - #include -diff -up qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp.me1 qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp ---- qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp.me1 2023-02-20 15:00:23.967862291 +0100 -+++ qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp 2023-02-20 15:00:41.398058051 +0100 -@@ -4,6 +4,7 @@ - #include - #include - #include -+#include - #include - - // Polyfill needed by Qt when building for Android with GCC -diff -up qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp.me qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp ---- qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp.me 2023-02-20 15:12:32.276042434 +0100 -+++ qtlocation-everywhere-src-5.15.8/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp 2023-02-20 15:12:58.578501426 +0100 -@@ -1,5 +1,6 @@ - #pragma once - -+#include - #include - - namespace mbgl { diff --git a/qtlocation-icu-75.patch b/qtlocation-icu-75.patch deleted file mode 100644 index 28b760350d0a987f5318f7bd02a90ffcd60ef9d5..0000000000000000000000000000000000000000 --- a/qtlocation-icu-75.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/src/3rdparty/mapbox-gl-native/mapbox-gl-native.pro 2024-11-01 18:13:54.767565225 +0800 -+++ b/src/3rdparty/mapbox-gl-native/mapbox-gl-native.pro 2024-11-01 18:14:18.764861615 +0800 -@@ -2,8 +2,7 @@ - - load(qt_helper_lib) - --CONFIG += qt c++14 exceptions warn_off staticlib object_parallel_to_source --CONFIG -= c++1z -+CONFIG += qt c++17 exceptions warn_off staticlib object_parallel_to_source - - QT += network-private \ - gui-private \