summaryrefslogtreecommitdiffstats
path: root/src/location/maps/qgeotiledmapscene.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-27 13:39:29 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-27 16:05:33 +0200
commitb9a3306bb9dd89155ca33bdb4d42675fc69aa26b (patch)
tree696bd028ca46680ff3e633b5c18bafd2b9c326dd /src/location/maps/qgeotiledmapscene.cpp
parent971423c512623b84618cfc73b992da1f1dc014f8 (diff)
Fix deprecation warnings
Fix warnings: maps/qgeotilefetcher.cpp:78:36: warning: 'QList<T> QSet<T>::toList() const [with T = QGeoTileSpec]' is deprecated: Use values() instead. [-Wdeprecated-declarations] declarativeplaces/qdeclarativeplace.cpp:1088:101: warning: 'QVariant qVariantFromValue(const T&) [with T = QDeclarativePlaceAttribute*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] maps/qgeotiledmapscene.cpp:498:62: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QGeoTileSpec]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] maps/qgeotiledmapscene.cpp:498:89: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QGeoTileSpec]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] maps/qgeotiledmapscene.cpp:643:61: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QGeoTileSpec]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] maps/qgeotiledmapscene.cpp:643:94: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QGeoTileSpec]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] /data1/frkleint/qt-dev/qtbase/include/QtCore/../../src/corelib/tools/qset.h:400:23: warning: 'QSet<T> QList<T>::toSet() const [with T = QGeoTileSpec]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] declarativemaps/qdeclarativegeomap.cpp:453:45: warning: 'QSet<T> QList<T>::toSet() const [with T = QObject*]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qplacemanagerengine_test.h:477:72: warning: 'QSet<T> QList<T>::toSet() const [with T = QPlaceCategory]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] ../utils/qlocationtestutils.cpp:50:31: warning: 'QString& QString::sprintf(const char*, ...)' is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] Change-Id: Ice04fd0f158ee95a42f53b33dcb7b9204a33c90e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps/qgeotiledmapscene.cpp')
-rw-r--r--src/location/maps/qgeotiledmapscene.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/location/maps/qgeotiledmapscene.cpp b/src/location/maps/qgeotiledmapscene.cpp
index a5f94c8d..a8bee156 100644
--- a/src/location/maps/qgeotiledmapscene.cpp
+++ b/src/location/maps/qgeotiledmapscene.cpp
@@ -495,7 +495,9 @@ void QGeoTiledMapRootNode::updateTiles(QGeoTiledMapTileContainerNode *root,
cameraMatrix.lookAt(toVector3D(eye), toVector3D(center), toVector3D(d->m_cameraUp));
root->setMatrix(d->m_projectionMatrix * cameraMatrix);
- const QSet<QGeoTileSpec> tilesInSG = QSet<QGeoTileSpec>::fromList(root->tiles.keys());
+ QSet<QGeoTileSpec> tilesInSG;
+ for (auto it = root->tiles.cbegin(), end = root->tiles.cend(); it != end; ++it)
+ tilesInSG.insert(it.key());
const QSet<QGeoTileSpec> toRemove = tilesInSG - d->m_visibleTiles;
const QSet<QGeoTileSpec> toAdd = d->m_visibleTiles - tilesInSG;
@@ -640,7 +642,9 @@ QSGNode *QGeoTiledMapScene::updateSceneGraph(QSGNode *oldNode, QQuickWindow *win
d->m_updatedTextures.clear();
}
- const QSet<QGeoTileSpec> textures = QSet<QGeoTileSpec>::fromList(mapRoot->textures.keys());
+ QSet<QGeoTileSpec> textures;
+ for (auto it = mapRoot->textures.cbegin(), end = mapRoot->textures.cend(); it != end; ++it)
+ textures.insert(it.key());
const QSet<QGeoTileSpec> toRemove = textures - d->m_visibleTiles;
const QSet<QGeoTileSpec> toAdd = d->m_visibleTiles - textures;