Fixed most Qt 5.14 deprecation warnings

This commit is contained in:
Mat Sutcliffe
2019-12-31 00:38:59 +00:00
parent 010aaf58b5
commit 4a0d8e9864
40 changed files with 110 additions and 107 deletions

View File

@@ -61,7 +61,7 @@ namespace BlackMisc
{
const QSet<QString> levels = this->getLevelStrings();
if (levels.isEmpty()) {return {}; }
return levels.toList().join(separator);
return levels.values().join(separator);
}
QList<int> CAircraftCategoryList::getFirstLevels() const
@@ -72,7 +72,7 @@ namespace BlackMisc
levels.insert(category.getFirstLevel());
}
levels.remove(0);
QList<int> ll = levels.toList();
QList<int> ll = levels.values();
std::sort(ll.begin(), ll.end());
return ll;
}
@@ -85,7 +85,7 @@ namespace BlackMisc
levels.insert(category.getSecondLevel());
}
levels.remove(0);
QList<int> ll = levels.toList();
QList<int> ll = levels.values();
std::sort(ll.begin(), ll.end());
return ll;
}

View File

@@ -110,7 +110,7 @@ namespace BlackMisc
locations.insert(airport.getLocation());
}
QStringList locs = locations.toList();
QStringList locs = locations.values();
if (sorted) { locs.sort(); }
return locs;
}

View File

@@ -906,9 +906,9 @@ namespace BlackMisc
{
static const QStringList e = []
{
QSet<QString> el(CFlightPlan::faaEquipmentCodes().toSet());
el.unite(CFlightPlan::squawkBoxEquipmentCodes().toSet());
return el.toList();
QSet<QString> el(CFlightPlan::faaEquipmentCodes().begin(), CFlightPlan::faaEquipmentCodes().end());
el.unite(QSet<QString>(CFlightPlan::squawkBoxEquipmentCodes().begin(), CFlightPlan::squawkBoxEquipmentCodes().end()));
return el.values();
}();
return e;
}