@@ -29,16 +29,25 @@ PprzMap::PprzMap(QWidget *parent) :
2929 for (auto ac: AircraftManager::get ()->getAircrafts ()) {
3030 auto [nw, se] = ac->getFlightPlan ()->boundingBox ();
3131 auto tile_names = SRTMManager::get ()->get_tile_names (se.lat (), nw.lat (), nw.lon (), se.lon ());
32+ #if QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR < 15
3233 tiles.unite (tile_names.toSet ());
34+ #else
35+ auto tiles_set = QSet<QString>(tile_names.begin (), tile_names.end ());
36+ tiles.unite (tiles_set);
37+ #endif
3338 }
3439
3540 // Download SRTM tile(s) for view footprint
3641 Point2DLatLon nw (0 , 0 ), se (0 , 0 );
3742 ui->map ->getViewPoints (nw, se);
3843 auto tile_names = SRTMManager::get ()->get_tile_names (se.lat (), nw.lat (), nw.lon (), se.lon ());
44+ #if QT_VERSION_MAJOR == 5 && QT_VERSION_MINOR < 15
3945 tiles.unite (tile_names.toSet ());
40-
41- SRTMManager::get ()->load_tiles (tiles.toList (), local_only);
46+ #else
47+ auto tiles_set = QSet<QString>(tile_names.begin (), tile_names.end ());
48+ tiles.unite (tiles_set);
49+ #endif
50+ SRTMManager::get ()->load_tiles (tiles.values (), local_only);
4251
4352 };
4453
0 commit comments