summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeotilefetcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/location/maps/qgeotilefetcher.cpp')
-rw-r--r--src/location/maps/qgeotilefetcher.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/location/maps/qgeotilefetcher.cpp b/src/location/maps/qgeotilefetcher.cpp
index 40a1a721..0e0e81ca 100644
--- a/src/location/maps/qgeotilefetcher.cpp
+++ b/src/location/maps/qgeotilefetcher.cpp
@@ -73,7 +73,7 @@ void QGeoTileFetcher::updateTileRequests(const QSet<QGeoTileSpec> &tilesAdded,
d->queue_ += tilesAdded.toList();
- if (d->enabled_ && !d->queue_.isEmpty() && !d->timer_.isActive())
+ if (d->enabled_ && initialized() && !d->queue_.isEmpty() && !d->timer_.isActive())
d->timer_.start(0, this);
}
@@ -158,7 +158,7 @@ void QGeoTileFetcher::timerEvent(QTimerEvent *event)
return;
}
- if (d->queue_.isEmpty()) {
+ if (d->queue_.isEmpty() || !initialized()) {
d->timer_.stop();
return;
}
@@ -166,6 +166,11 @@ void QGeoTileFetcher::timerEvent(QTimerEvent *event)
requestNextTile();
}
+bool QGeoTileFetcher::initialized() const
+{
+ return true;
+}
+
void QGeoTileFetcher::handleReply(QGeoTiledMapReply *reply, const QGeoTileSpec &spec)
{
Q_D(QGeoTileFetcher);