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/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.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/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp')
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp b/src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp index b66b3b0e..6212614b 100644 --- a/src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp +++ b/src/location/declarativemaps/qdeclarativegeomapcopyrightsnotice.cpp @@ -43,6 +43,7 @@ #include <QtGui/QTextDocument> #include <QtGui/QAbstractTextDocumentLayout> #include <QtGui/QPainter> +#include <QtGui/QImage> #include <QtQuick/private/qquickanchors_p.h> #include <QtLocation/private/qdeclarativegeomap_p.h> #include <QtQuick/private/qquickpainteditem_p.h> @@ -149,10 +150,10 @@ void QDeclarativeGeoMapCopyrightNotice::setMapSource(QDeclarativeGeoMap *map) if (m_mapSource->m_copyrights && !m_mapSource->m_copyrights->m_copyrightsImage.isNull()) m_copyrightsImage = m_mapSource->m_copyrights->m_copyrightsImage; - connect(mapSource(), SIGNAL(copyrightsChanged(QImage)), - this, SLOT(copyrightsChanged(QImage))); - connect(mapSource(), SIGNAL(copyrightsChanged(QString)), - this, SLOT(copyrightsChanged(QString))); + connect(mapSource(), &QDeclarativeGeoMap::copyrightsImageChanged, + this, &QDeclarativeGeoMapCopyrightNotice::copyrightsImageChanged); + connect(mapSource(), &QDeclarativeGeoMap::copyrightsChanged, + this, &QDeclarativeGeoMapCopyrightNotice::copyrightsChanged); if (m_mapSource->m_map) connectMap(); @@ -163,10 +164,10 @@ void QDeclarativeGeoMapCopyrightNotice::setMapSource(QDeclarativeGeoMap *map) void QDeclarativeGeoMapCopyrightNotice::connectMap() { - connect(m_mapSource->m_map, SIGNAL(copyrightsStyleSheetChanged(QString)), - this, SLOT(onCopyrightsStyleSheetChanged(QString))); - connect(this, SIGNAL(linkActivated(QString)), - mapSource(), SIGNAL(copyrightLinkActivated(QString))); + connect(m_mapSource->m_map.data(), &QGeoMap::copyrightsStyleSheetChanged, + this, &QDeclarativeGeoMapCopyrightNotice::onCopyrightsStyleSheetChanged); + connect(this, &QDeclarativeGeoMapCopyrightNotice::linkActivated, + mapSource(), &QDeclarativeGeoMap::copyrightLinkActivated); onCopyrightsStyleSheetChanged(m_mapSource->m_map->copyrightsStyleSheet()); @@ -308,7 +309,7 @@ void QDeclarativeGeoMapCopyrightNotice::setCopyrightsZ(qreal copyrightsZ) /*! \internal */ -void QDeclarativeGeoMapCopyrightNotice::copyrightsChanged(const QImage ©rightsImage) +void QDeclarativeGeoMapCopyrightNotice::copyrightsImageChanged(const QImage ©rightsImage) { Q_D(QDeclarativeGeoMapCopyrightNotice); delete m_copyrightsHtml; |