1
0
Fork 0

Fix another Qt forwards/backwards compat point

This commit is contained in:
James Turner 2021-05-24 16:45:35 +01:00
parent a702fd7b27
commit 4370d3d1f7

View file

@ -51,8 +51,11 @@ AddonsModel::~AddonsModel()
void AddonsModel::resetData(const QStringList& ndata)
{
beginResetModel();
QSet<QString> newSet = QSet<QString>{ndata.begin(), ndata.end()};
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
const auto newSet = QSet<QString>{ndata.begin(), ndata.end()};
#else
const auto newSet = QSet<QString>::fromList(ndata);
#endif
for(const auto& path : m_addonsList) {
if (!newSet.contains(path)) {
m_addonsMap.remove(path);