diff options
Diffstat (limited to 'src/location/maps')
-rw-r--r-- | src/location/maps/qgeocameracapabilities.cpp | 3 | ||||
-rw-r--r-- | src/location/maps/qgeocameradata.cpp | 3 | ||||
-rw-r--r-- | src/location/maps/qgeomaneuver.cpp | 3 | ||||
-rw-r--r-- | src/location/maps/qgeomappingmanagerengine.h | 2 | ||||
-rw-r--r-- | src/location/maps/qgeomapscene.cpp | 2 | ||||
-rw-r--r-- | src/location/maps/qgeomaptype.cpp | 3 | ||||
-rw-r--r-- | src/location/maps/qgeoroute.cpp | 3 | ||||
-rw-r--r-- | src/location/maps/qgeoroutereply_p.h | 2 | ||||
-rw-r--r-- | src/location/maps/qgeorouterequest.cpp | 3 | ||||
-rw-r--r-- | src/location/maps/qgeorouterequest.h | 2 | ||||
-rw-r--r-- | src/location/maps/qgeoroutesegment.cpp | 3 | ||||
-rw-r--r-- | src/location/maps/qgeoserviceprovider.cpp | 2 | ||||
-rw-r--r-- | src/location/maps/qgeotiledmapdata.cpp | 2 | ||||
-rw-r--r-- | src/location/maps/qgeotiledmappingmanagerengine.h | 2 | ||||
-rw-r--r-- | src/location/maps/qgeotilefetcher_p.h | 2 | ||||
-rw-r--r-- | src/location/maps/qgeotilerequestmanager.cpp | 2 | ||||
-rw-r--r-- | src/location/maps/qgeotilerequestmanager_p.h | 2 | ||||
-rw-r--r-- | src/location/maps/qgeotilespec.cpp | 3 |
18 files changed, 34 insertions, 10 deletions
diff --git a/src/location/maps/qgeocameracapabilities.cpp b/src/location/maps/qgeocameracapabilities.cpp index 3752affd..ab938abb 100644 --- a/src/location/maps/qgeocameracapabilities.cpp +++ b/src/location/maps/qgeocameracapabilities.cpp @@ -146,6 +146,9 @@ QGeoCameraCapabilities::~QGeoCameraCapabilities() {} */ QGeoCameraCapabilities& QGeoCameraCapabilities::operator = (const QGeoCameraCapabilities &other) { + if (this == &other) + return *this; + d = other.d; return *this; } diff --git a/src/location/maps/qgeocameradata.cpp b/src/location/maps/qgeocameradata.cpp index 9c5b9839..f9d2d4bf 100644 --- a/src/location/maps/qgeocameradata.cpp +++ b/src/location/maps/qgeocameradata.cpp @@ -158,6 +158,9 @@ QGeoCameraData::~QGeoCameraData() QGeoCameraData& QGeoCameraData::operator = (const QGeoCameraData &other) { + if (this == &other) + return *this; + d = other.d; return *this; } diff --git a/src/location/maps/qgeomaneuver.cpp b/src/location/maps/qgeomaneuver.cpp index 50b5e56c..4a63d8b4 100644 --- a/src/location/maps/qgeomaneuver.cpp +++ b/src/location/maps/qgeomaneuver.cpp @@ -139,6 +139,9 @@ QGeoManeuver::~QGeoManeuver() {} */ QGeoManeuver& QGeoManeuver::operator= (const QGeoManeuver & other) { + if (this == &other) + return *this; + d_ptr = other.d_ptr; return *this; } diff --git a/src/location/maps/qgeomappingmanagerengine.h b/src/location/maps/qgeomappingmanagerengine.h index 9812c4c8..7c676e1f 100644 --- a/src/location/maps/qgeomappingmanagerengine.h +++ b/src/location/maps/qgeomappingmanagerengine.h @@ -75,7 +75,7 @@ class Q_LOCATION_EXPORT QGeoMappingManagerEngine : public QObject Q_OBJECT public: - QGeoMappingManagerEngine(QObject *parent = 0); + explicit QGeoMappingManagerEngine(QObject *parent = 0); virtual ~QGeoMappingManagerEngine(); virtual QGeoMapData* createMapData() = 0; diff --git a/src/location/maps/qgeomapscene.cpp b/src/location/maps/qgeomapscene.cpp index c8fb3375..665ed789 100644 --- a/src/location/maps/qgeomapscene.cpp +++ b/src/location/maps/qgeomapscene.cpp @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE class QGeoMapScenePrivate { public: - QGeoMapScenePrivate(QGeoMapScene *scene); + explicit QGeoMapScenePrivate(QGeoMapScene *scene); ~QGeoMapScenePrivate(); QSize screenSize_; // in pixels diff --git a/src/location/maps/qgeomaptype.cpp b/src/location/maps/qgeomaptype.cpp index ce8c9191..331b32c3 100644 --- a/src/location/maps/qgeomaptype.cpp +++ b/src/location/maps/qgeomaptype.cpp @@ -57,6 +57,9 @@ QGeoMapType::~QGeoMapType() {} QGeoMapType& QGeoMapType::operator = (const QGeoMapType &other) { + if (this == &other) + return *this; + d_ptr = other.d_ptr; return *this; } diff --git a/src/location/maps/qgeoroute.cpp b/src/location/maps/qgeoroute.cpp index a641a1de..bc8151e0 100644 --- a/src/location/maps/qgeoroute.cpp +++ b/src/location/maps/qgeoroute.cpp @@ -97,6 +97,9 @@ QGeoRoute::~QGeoRoute() */ QGeoRoute& QGeoRoute::operator= (const QGeoRoute & other) { + if (this == &other) + return *this; + d_ptr = other.d_ptr; return *this; } diff --git a/src/location/maps/qgeoroutereply_p.h b/src/location/maps/qgeoroutereply_p.h index ed899b32..fa9fcdbd 100644 --- a/src/location/maps/qgeoroutereply_p.h +++ b/src/location/maps/qgeoroutereply_p.h @@ -65,7 +65,7 @@ class QGeoRoute; class QGeoRouteReplyPrivate { public: - QGeoRouteReplyPrivate(const QGeoRouteRequest &request); + explicit QGeoRouteReplyPrivate(const QGeoRouteRequest &request); QGeoRouteReplyPrivate(QGeoRouteReply::Error error, QString errorString); ~QGeoRouteReplyPrivate(); diff --git a/src/location/maps/qgeorouterequest.cpp b/src/location/maps/qgeorouterequest.cpp index 2f9f3d39..1278cb51 100644 --- a/src/location/maps/qgeorouterequest.cpp +++ b/src/location/maps/qgeorouterequest.cpp @@ -257,6 +257,9 @@ QGeoRouteRequest::~QGeoRouteRequest() {} */ QGeoRouteRequest& QGeoRouteRequest::operator= (const QGeoRouteRequest & other) { + if (this == &other) + return *this; + d_ptr = other.d_ptr; return *this; } diff --git a/src/location/maps/qgeorouterequest.h b/src/location/maps/qgeorouterequest.h index 9af96f7f..0e6b0d8d 100644 --- a/src/location/maps/qgeorouterequest.h +++ b/src/location/maps/qgeorouterequest.h @@ -112,7 +112,7 @@ public: }; Q_DECLARE_FLAGS(ManeuverDetails, ManeuverDetail) - QGeoRouteRequest(const QList<QGeoCoordinate> &waypoints = QList<QGeoCoordinate>()); + explicit QGeoRouteRequest(const QList<QGeoCoordinate> &waypoints = QList<QGeoCoordinate>()); QGeoRouteRequest(const QGeoCoordinate &origin, const QGeoCoordinate &destination); QGeoRouteRequest(const QGeoRouteRequest &other); diff --git a/src/location/maps/qgeoroutesegment.cpp b/src/location/maps/qgeoroutesegment.cpp index 653dccd1..5264a5ac 100644 --- a/src/location/maps/qgeoroutesegment.cpp +++ b/src/location/maps/qgeoroutesegment.cpp @@ -98,6 +98,9 @@ QGeoRouteSegment::~QGeoRouteSegment() {} */ QGeoRouteSegment& QGeoRouteSegment::operator= (const QGeoRouteSegment & other) { + if (this == &other) + return *this; + d_ptr = other.d_ptr; return *this; } diff --git a/src/location/maps/qgeoserviceprovider.cpp b/src/location/maps/qgeoserviceprovider.cpp index 628148cc..0bfdb660 100644 --- a/src/location/maps/qgeoserviceprovider.cpp +++ b/src/location/maps/qgeoserviceprovider.cpp @@ -181,7 +181,7 @@ Flags QGeoServiceProviderPrivate::features(const char *enumName) if (this->metaData.contains(QStringLiteral("Features")) && this->metaData.value(QStringLiteral("Features")).isArray()) { QJsonArray features = this->metaData.value(QStringLiteral("Features")).toArray(); - foreach (QJsonValue v, features) { + foreach (const QJsonValue &v, features) { int val = en.keyToValue(v.toString().toLatin1().constData()); if (v.isString() && val != -1) { ret |= typename Flags::enum_type(val); diff --git a/src/location/maps/qgeotiledmapdata.cpp b/src/location/maps/qgeotiledmapdata.cpp index 3fc294de..dbc8bb99 100644 --- a/src/location/maps/qgeotiledmapdata.cpp +++ b/src/location/maps/qgeotiledmapdata.cpp @@ -297,7 +297,7 @@ void QGeoTiledMapDataPrivate::changeCameraData(const QGeoCameraData &oldCameraDa QList<QSharedPointer<QGeoTileTexture> > cachedTiles = tileRequests_->requestTiles(visibleTiles_); - foreach (QSharedPointer<QGeoTileTexture> tex, cachedTiles) { + foreach (const QSharedPointer<QGeoTileTexture> &tex, cachedTiles) { mapScene_->addTile(tex->spec, tex); } diff --git a/src/location/maps/qgeotiledmappingmanagerengine.h b/src/location/maps/qgeotiledmappingmanagerengine.h index 4d81415d..7b529c94 100644 --- a/src/location/maps/qgeotiledmappingmanagerengine.h +++ b/src/location/maps/qgeotiledmappingmanagerengine.h @@ -81,7 +81,7 @@ public: }; Q_DECLARE_FLAGS(CacheAreas, CacheArea) - QGeoTiledMappingManagerEngine(QObject *parent = 0); + explicit QGeoTiledMappingManagerEngine(QObject *parent = 0); virtual ~QGeoTiledMappingManagerEngine(); QGeoTileFetcher *tileFetcher(); diff --git a/src/location/maps/qgeotilefetcher_p.h b/src/location/maps/qgeotilefetcher_p.h index 14af709f..23eba010 100644 --- a/src/location/maps/qgeotilefetcher_p.h +++ b/src/location/maps/qgeotilefetcher_p.h @@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE class QGeoTileFetcherPrivate { public: - QGeoTileFetcherPrivate(QGeoTiledMappingManagerEngine *engine); + explicit QGeoTileFetcherPrivate(QGeoTiledMappingManagerEngine *engine); virtual ~QGeoTileFetcherPrivate(); QGeoTiledMappingManagerEngine *engine_; diff --git a/src/location/maps/qgeotilerequestmanager.cpp b/src/location/maps/qgeotilerequestmanager.cpp index d63a4f2a..f4fc791b 100644 --- a/src/location/maps/qgeotilerequestmanager.cpp +++ b/src/location/maps/qgeotilerequestmanager.cpp @@ -53,7 +53,7 @@ class RetryFuture; class QGeoTileRequestManagerPrivate { public: - QGeoTileRequestManagerPrivate(QGeoTiledMapData *map); + explicit QGeoTileRequestManagerPrivate(QGeoTiledMapData *map); ~QGeoTileRequestManagerPrivate(); QGeoTiledMapData *map_; diff --git a/src/location/maps/qgeotilerequestmanager_p.h b/src/location/maps/qgeotilerequestmanager_p.h index bc43f37d..3f394de8 100644 --- a/src/location/maps/qgeotilerequestmanager_p.h +++ b/src/location/maps/qgeotilerequestmanager_p.h @@ -70,7 +70,7 @@ class QGeoTileRequestManagerPrivate; class QGeoTileRequestManager { public: - QGeoTileRequestManager(QGeoTiledMapData *map); + explicit QGeoTileRequestManager(QGeoTiledMapData *map); ~QGeoTileRequestManager(); QList<QSharedPointer<QGeoTileTexture> > requestTiles(const QSet<QGeoTileSpec> &tiles); diff --git a/src/location/maps/qgeotilespec.cpp b/src/location/maps/qgeotilespec.cpp index 9ce3f1b8..cb768c37 100644 --- a/src/location/maps/qgeotilespec.cpp +++ b/src/location/maps/qgeotilespec.cpp @@ -58,6 +58,9 @@ QGeoTileSpec::~QGeoTileSpec() { QGeoTileSpec& QGeoTileSpec::operator = (const QGeoTileSpec &other) { + if (this == &other) + return *this; + d = other.d; return *this; } |