summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeotilefetcher.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/qgeotilefetcher.cpp
parent971423c512623b84618cfc73b992da1f1dc014f8 (diff)
downloadqtlocation-b9a3306bb9dd89155ca33bdb4d42675fc69aa26b.tar.gz
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/qgeotilefetcher.cpp')
-rw-r--r--src/location/maps/qgeotilefetcher.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/location/maps/qgeotilefetcher.cpp b/src/location/maps/qgeotilefetcher.cpp
index b3f7021b..cfca57ac 100644
--- a/src/location/maps/qgeotilefetcher.cpp
+++ b/src/location/maps/qgeotilefetcher.cpp
@@ -43,6 +43,9 @@
#include "qgeotilespec_p.h"
#include "qgeotiledmap_p.h"
+#include <algorithm>
+#include <iterator>
+
QT_BEGIN_NAMESPACE
QGeoTileFetcher::QGeoTileFetcher(QGeoMappingManagerEngine *parent)
@@ -75,7 +78,7 @@ void QGeoTileFetcher::updateTileRequests(const QSet<QGeoTileSpec> &tilesAdded,
cancelTileRequests(tilesRemoved);
- d->queue_ += tilesAdded.toList();
+ std::copy(tilesAdded.cbegin(), tilesAdded.cend(), std::back_inserter(d->queue_));
if (d->enabled_ && initialized() && !d->queue_.isEmpty() && !d->timer_.isActive())
d->timer_.start(0, this);