diff options
Diffstat (limited to 'src/location/maps/qgeotiledmapdata.cpp')
-rw-r--r-- | src/location/maps/qgeotiledmapdata.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/location/maps/qgeotiledmapdata.cpp b/src/location/maps/qgeotiledmapdata.cpp index dd64917a..204414f8 100644 --- a/src/location/maps/qgeotiledmapdata.cpp +++ b/src/location/maps/qgeotiledmapdata.cpp @@ -77,6 +77,12 @@ QGeoTiledMapData::QGeoTiledMapData(QGeoTiledMappingManagerEngine *engine, QObjec { d_ptr = new QGeoTiledMapDataPrivate(this, engine); engine->registerMap(this); + + connect(engine, + SIGNAL(mapVersionChanged()), + this, + SLOT(updateMapVersion())); + QMetaObject::invokeMethod(this, "updateMapVersion", Qt::QueuedConnection); } QGeoTiledMapData::~QGeoTiledMapData() @@ -134,6 +140,17 @@ void QGeoTiledMapData::changeActiveMapType(const QGeoMapType mapType) d->changeActiveMapType(mapType); } +int QGeoTiledMapData::mapVersion() +{ + return -1; +} + +void QGeoTiledMapData::updateMapVersion() +{ + Q_D(QGeoTiledMapData); + d->changeMapVersion(mapVersion()); +} + void QGeoTiledMapData::evaluateCopyrights(const QSet<QGeoTileSpec> &visibleTiles) { Q_UNUSED(visibleTiles); @@ -267,6 +284,11 @@ void QGeoTiledMapDataPrivate::changeActiveMapType(const QGeoMapType mapType) cameraTiles_->setMapType(mapType); } +void QGeoTiledMapDataPrivate::changeMapVersion(int mapVersion) +{ + cameraTiles_->setMapVersion(mapVersion); +} + void QGeoTiledMapDataPrivate::resized(int width, int height) { if (cameraTiles_) |