Commit 709f5d9c authored by Laurent Montel's avatar Laurent Montel 😁

Port deprecated qSort

parent 8f6cfe78
......@@ -253,9 +253,9 @@ void UpdateModel::setResources(const QList<AbstractResource*>& resources)
}
}
const auto sortUpdateItems = [](UpdateItem *a, UpdateItem *b) { return a->name() < b->name(); };
qSort(appItems.begin(), appItems.end(), sortUpdateItems);
qSort(systemItems.begin(), systemItems.end(), sortUpdateItems);
qSort(addonItems.begin(), addonItems.end(), sortUpdateItems);
std::sort(appItems.begin(), appItems.end(), sortUpdateItems);
std::sort(systemItems.begin(), systemItems.end(), sortUpdateItems);
std::sort(addonItems.begin(), addonItems.end(), sortUpdateItems);
m_updateItems = (QVector<UpdateItem*>() << appItems << addonItems << systemItems);
endResetModel();
......
......@@ -183,7 +183,7 @@ void ResourcesProxyModel::addResources(const QVector<AbstractResource *>& _res)
return;
if (!m_sortByRelevancy)
qSort(res.begin(), res.end(), [this](AbstractResource* res, AbstractResource* res2){ return lessThan(res, res2); });
std::sort(res.begin(), res.end(), [this](AbstractResource* res, AbstractResource* res2){ return lessThan(res, res2); });
sortedInsertion(res);
fetchSubcategories();
......@@ -196,7 +196,7 @@ void ResourcesProxyModel::invalidateSorting()
if (!m_sortByRelevancy) {
beginResetModel();
qSort(m_displayedResources.begin(), m_displayedResources.end(), [this](AbstractResource* res, AbstractResource* res2){ return lessThan(res, res2); });
std::sort(m_displayedResources.begin(), m_displayedResources.end(), [this](AbstractResource* res, AbstractResource* res2){ return lessThan(res, res2); });
endResetModel();
}
}
......
......@@ -67,7 +67,7 @@ void StandardBackendUpdater::start()
emit progressingChanged(true);
setProgress(0);
auto upgradeList = m_toUpgrade.toList();
qSort(upgradeList.begin(), upgradeList.end(), [](const AbstractResource* a, const AbstractResource* b){ return a->name() < b->name(); });
std::sort(upgradeList.begin(), upgradeList.end(), [](const AbstractResource* a, const AbstractResource* b){ return a->name() < b->name(); });
const bool couldCancel = m_canCancel;
foreach(AbstractResource* res, upgradeList) {
......
......@@ -53,7 +53,7 @@ public:
Category::addSubcategory(ret, c);
}
}
qSort(ret.begin(), ret.end(), Category::categoryLessThan);
std::sort(ret.begin(), ret.end(), Category::categoryLessThan);
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment