diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-08-22 15:09:25 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-08-23 14:43:13 +0200 |
commit | ec29ae5ad6afb4a4b0507bf2f81bdcfe0fcec123 (patch) | |
tree | b36f761ab8f01b64db2e57cafb3d9baa785bed6f /src/plugins/geoservices/esri/placemanagerengine_esri.cpp | |
parent | 4c4ef4ae797549ac4597d4c8aeba1533c8e4c1f6 (diff) | |
download | qtlocation-ec29ae5ad6afb4a4b0507bf2f81bdcfe0fcec123.tar.gz |
Port to pointer-to-member-function connection syntax
Rename overloads that would cause conflict and require explicit overloa
resolution via QOverload:
- Q*Reply::error -> errorOccurred (equivalent to QNetworkReply)
- Q*Engine::error -> errorOccurred (for consistency, even if no overloa
- Q*Manager::error -> errorOccurred (ditto)
- QDeclarativeGeoMap::copyrightChanged -> copyrightImageChanged
As a drive-by, change QString value parameters to const references.
Pick-to: 6.2
Change-Id: I1ab16079842540ca0a86f711d83b35c8c56135e6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/plugins/geoservices/esri/placemanagerengine_esri.cpp')
-rw-r--r-- | src/plugins/geoservices/esri/placemanagerengine_esri.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/plugins/geoservices/esri/placemanagerengine_esri.cpp b/src/plugins/geoservices/esri/placemanagerengine_esri.cpp index 0df3d0c9..f48a9e6d 100644 --- a/src/plugins/geoservices/esri/placemanagerengine_esri.cpp +++ b/src/plugins/geoservices/esri/placemanagerengine_esri.cpp @@ -155,8 +155,10 @@ QPlaceSearchReply *PlaceManagerEngineEsri::search(const QPlaceSearchRequest &req QNetworkReply *networkReply = m_networkManager->get(networkRequest); PlaceSearchReplyEsri *reply = new PlaceSearchReplyEsri(request, networkReply, m_candidateFieldsLocale, m_countriesLocale, this); - connect(reply, SIGNAL(finished()), this, SLOT(replyFinished())); - connect(reply, SIGNAL(error(QPlaceReply::Error,QString)), this, SLOT(replyError(QPlaceReply::Error,QString))); + connect(reply, &PlaceSearchReplyEsri::finished, + this, &PlaceManagerEngineEsri::replyFinished); + connect(reply, &PlaceSearchReplyEsri::errorOccurred, + this, &PlaceManagerEngineEsri::replyError); return reply; } @@ -172,7 +174,7 @@ void PlaceManagerEngineEsri::replyError(QPlaceReply::Error errorCode, const QStr { QPlaceReply *reply = qobject_cast<QPlaceReply *>(sender()); if (reply) - emit error(reply, errorCode, errorString); + emit errorOccurred(reply, errorCode, errorString); } /***** Categories *****/ @@ -182,8 +184,10 @@ QPlaceReply *PlaceManagerEngineEsri::initializeCategories() initializeGeocodeServer(); PlaceCategoriesReplyEsri *reply = new PlaceCategoriesReplyEsri(this); - connect(reply, SIGNAL(finished()), this, SLOT(replyFinished())); - connect(reply, SIGNAL(error(QPlaceReply::Error,QString)), this, SLOT(replyError(QPlaceReply::Error,QString))); + connect(reply, &PlaceCategoriesReplyEsri::finished, + this, &PlaceManagerEngineEsri::replyFinished); + connect(reply, &PlaceCategoriesReplyEsri::errorOccurred, + this, &PlaceManagerEngineEsri::replyError); // TODO delayed finished() emission if (!m_categories.isEmpty()) @@ -267,8 +271,10 @@ void PlaceManagerEngineEsri::initializeGeocodeServer() if (m_categories.isEmpty() && !m_geocodeServerReply) { m_geocodeServerReply = m_networkManager->get(QNetworkRequest(kUrlGeocodeServer)); - connect(m_geocodeServerReply, SIGNAL(finished()), this, SLOT(geocodeServerReplyFinished())); - connect(m_geocodeServerReply, SIGNAL(errorOccurred(QNetworkReply::NetworkError)), this, SLOT(geocodeServerReplyError())); + connect(m_geocodeServerReply, &QNetworkReply::finished, + this, &PlaceManagerEngineEsri::geocodeServerReplyFinished); + connect(m_geocodeServerReply, &QNetworkReply::errorOccurred, + this, &PlaceManagerEngineEsri::geocodeServerReplyError); } } |