summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/osm
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2014-02-10 13:16:15 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-10 14:48:25 +0100
commitcdf5af5ba4c80c98cf4967ecf82ecac80ce3b854 (patch)
tree6e5701ac6f5b2c602353430962f6ea5621d46fbc /src/plugins/geoservices/osm
parent62234914bc39be509c6a764c99d592e0bc5ecb5c (diff)
downloadqtlocation-cdf5af5ba4c80c98cf4967ecf82ecac80ce3b854.tar.gz
Test that the mapping manager engine pointer is still valid.
QPointer holds a guarded pointer to a QObject. It must always be tested prior to use. Changed the parameter type to remove the need for the static_cast when setting the QPointer member. The root cause was that the tile fetcher object was not being destroyed when the mapping manager engine was. Which was because the two objects were in different threads. Some of the service specific tile fetchers were directly calling into the engine objects across thread. Gah. Since Qt 5 QNAM uses an application global thread for processing requests, there is no need to use threads in the tile fetcher. Change-Id: Id9df35ddfa78df2cbf334006fe5fc9726a75f92d Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/plugins/geoservices/osm')
-rw-r--r--src/plugins/geoservices/osm/qgeotilefetcherosm.cpp2
-rw-r--r--src/plugins/geoservices/osm/qgeotilefetcherosm.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/geoservices/osm/qgeotilefetcherosm.cpp b/src/plugins/geoservices/osm/qgeotilefetcherosm.cpp
index 75c1492b..e149c65f 100644
--- a/src/plugins/geoservices/osm/qgeotilefetcherosm.cpp
+++ b/src/plugins/geoservices/osm/qgeotilefetcherosm.cpp
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
-QGeoTileFetcherOsm::QGeoTileFetcherOsm(QGeoTiledMappingManagerEngine *parent)
+QGeoTileFetcherOsm::QGeoTileFetcherOsm(QObject *parent)
: QGeoTileFetcher(parent), m_networkManager(new QNetworkAccessManager(this)),
m_userAgent("Qt Location based application")
{
diff --git a/src/plugins/geoservices/osm/qgeotilefetcherosm.h b/src/plugins/geoservices/osm/qgeotilefetcherosm.h
index ae88ab97..e705a2d9 100644
--- a/src/plugins/geoservices/osm/qgeotilefetcherosm.h
+++ b/src/plugins/geoservices/osm/qgeotilefetcherosm.h
@@ -54,7 +54,7 @@ class QGeoTileFetcherOsm : public QGeoTileFetcher
Q_OBJECT
public:
- explicit QGeoTileFetcherOsm(QGeoTiledMappingManagerEngine *parent = 0);
+ QGeoTileFetcherOsm(QObject *parent = 0);
void setUserAgent(const QByteArray &userAgent);