From f009c54773ad5dee6f27c05405439cc91108b310 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 23 May 2021 20:14:19 +0100 Subject: [PATCH] Qt deprecation fixes --- src/GUI/AddonsModel.cxx | 2 +- src/GUI/AircraftItemModel.cxx | 2 +- src/GUI/AircraftProxyModel.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GUI/AddonsModel.cxx b/src/GUI/AddonsModel.cxx index c846fe1a0..746593b96 100644 --- a/src/GUI/AddonsModel.cxx +++ b/src/GUI/AddonsModel.cxx @@ -51,7 +51,7 @@ AddonsModel::~AddonsModel() void AddonsModel::resetData(const QStringList& ndata) { beginResetModel(); - QSet newSet = QSet::fromList(ndata); + QSet newSet = QSet{ndata.begin(), ndata.end()}; for(const auto& path : m_addonsList) { if (!newSet.contains(path)) { diff --git a/src/GUI/AircraftItemModel.cxx b/src/GUI/AircraftItemModel.cxx index 481fae8c9..29ad7a332 100644 --- a/src/GUI/AircraftItemModel.cxx +++ b/src/GUI/AircraftItemModel.cxx @@ -147,7 +147,7 @@ void PackageDelegate::catalogRefreshed(CatalogRef aCatalog, StatusCode aReason) // silent about this } else if (aCatalog) { qWarning() << "failed refresh of" - << QString::fromStdString(aCatalog->url()) << ":" << aReason << endl; + << QString::fromStdString(aCatalog->url()) << ":" << aReason; } } diff --git a/src/GUI/AircraftProxyModel.cxx b/src/GUI/AircraftProxyModel.cxx index 994712039..501110448 100644 --- a/src/GUI/AircraftProxyModel.cxx +++ b/src/GUI/AircraftProxyModel.cxx @@ -46,7 +46,7 @@ void AircraftProxyModel::setAircraftFilterString(QString s) m_filterProps = new SGPropertyNode; int index = 0; - Q_FOREACH(QString term, s.split(QRegExp("\\W+"), QString::SkipEmptyParts)) { + Q_FOREACH(QString term, s.split(QRegExp("\\W+"), Qt::SkipEmptyParts)) { m_filterProps->getNode("all-of/text", index++, true)->setStringValue(term.toStdString()); }