Fix another Qt forwards/backwards compat point
This commit is contained in:
parent
a702fd7b27
commit
4370d3d1f7
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue