From 4370d3d1f7b9f42897ed43be8f1aaf8f03b75162 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 24 May 2021 16:45:35 +0100 Subject: [PATCH] Fix another Qt forwards/backwards compat point --- src/GUI/AddonsModel.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/GUI/AddonsModel.cxx b/src/GUI/AddonsModel.cxx index 746593b96..06b37e071 100644 --- a/src/GUI/AddonsModel.cxx +++ b/src/GUI/AddonsModel.cxx @@ -51,8 +51,11 @@ AddonsModel::~AddonsModel() void AddonsModel::resetData(const QStringList& ndata) { beginResetModel(); - QSet newSet = QSet{ndata.begin(), ndata.end()}; - +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + const auto newSet = QSet{ndata.begin(), ndata.end()}; +#else + const auto newSet = QSet::fromList(ndata); +#endif for(const auto& path : m_addonsList) { if (!newSet.contains(path)) { m_addonsMap.remove(path);