summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/osm/qgeofiletilecacheosm.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-08-03 11:47:29 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2018-07-26 11:40:43 +0000
commite079d8d8d8cd4f9e4bd85abdf39804075e34517b (patch)
tree21a4f05d92dd63ca020a81c5459e4308965a4e7a /src/plugins/geoservices/osm/qgeofiletilecacheosm.h
parentabcb5d1bccbc5913b7d994e0ad2685d484c35740 (diff)
downloadqtlocation-e079d8d8d8cd4f9e4bd85abdf39804075e34517b.tar.gz
Remove indexing of offline data from OSM plugin
With this patch, offline tiles will be looked up on the fly, thus removing the need to index the offline content at startup. Task-number: QTBUG-59665 Change-Id: I1db62c38363dafe82ee2f2ffc7f493ac5d958fc2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/geoservices/osm/qgeofiletilecacheosm.h')
-rw-r--r--src/plugins/geoservices/osm/qgeofiletilecacheosm.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/geoservices/osm/qgeofiletilecacheosm.h b/src/plugins/geoservices/osm/qgeofiletilecacheosm.h
index 5f11004c..da1fd0d3 100644
--- a/src/plugins/geoservices/osm/qgeofiletilecacheosm.h
+++ b/src/plugins/geoservices/osm/qgeofiletilecacheosm.h
@@ -66,20 +66,17 @@ protected Q_SLOTS:
protected:
void init() override;
+ inline QString tileSpecToFilename(const QGeoTileSpec &spec, const QString &format, int providerId) const;
QString tileSpecToFilename(const QGeoTileSpec &spec, const QString &format, const QString &directory) const override;
QGeoTileSpec filenameToTileSpec(const QString &filename) const override;
QSharedPointer<QGeoTileTexture> getFromOfflineStorage(const QGeoTileSpec &spec);
void dropTiles(int mapId);
void loadTiles(int mapId);
- void initOfflineRegistry(int mapId);
void clearObsoleteTiles(const QGeoTileProviderOsm *p);
- QString m_offlineDirectory;
- QHash<QGeoTileSpec, QString> m_tilespecToOfflineFilepath;
- QMap<int, QAtomicInt> m_requestCancel;
- QMap<int, QFuture<void>> m_mapIdFutures;
- QMutex storageLock;
+ QDir m_offlineDirectory;
+ bool m_offlineData;
QVector<QGeoTileProviderOsm *> m_providers;
QVector<bool> m_highDpi;
QVector<QDateTime> m_maxMapIdTimestamps;