Commit 8a7863b2 authored by Laurent Montel's avatar Laurent Montel 😁

Port qSort

parent 4df06e0e
......@@ -404,7 +404,7 @@ void Widget::themeMenuAboutToShow(QMenu *menu)
QAction *act;
qSort(sortedThemes.begin(), sortedThemes.end(), MessageList::Core::Theme::compareName);
std::sort(sortedThemes.begin(), sortedThemes.end(), MessageList::Core::Theme::compareName);
QList< Theme * >::ConstIterator endTheme(sortedThemes.constEnd());
for (QList< Theme * >::ConstIterator it = sortedThemes.constBegin(); it != endTheme; ++it) {
......@@ -499,7 +499,7 @@ void Widget::aggregationMenuAboutToShow(QMenu *menu)
QAction *act;
qSort(sortedAggregations.begin(), sortedAggregations.end(), MessageList::Core::Aggregation::compareName);
std::sort(sortedAggregations.begin(), sortedAggregations.end(), MessageList::Core::Aggregation::compareName);
QList<Aggregation * >::ConstIterator endagg(sortedAggregations.constEnd());
......
......@@ -117,7 +117,7 @@ void AggregationComboBoxPrivate::slotLoadAggregations()
// Get all message list aggregations and sort them into alphabetical order.
QList< Aggregation * > aggregations = Manager::instance()->aggregations().values();
qSort(aggregations.begin(), aggregations.end(), MessageList::Core::Aggregation::compareName);
std::sort(aggregations.begin(), aggregations.end(), MessageList::Core::Aggregation::compareName);
for (const Aggregation *aggregation : qAsConst(aggregations)) {
q->addItem(aggregation->name(), QVariant(aggregation->id()));
......
......@@ -112,7 +112,7 @@ void ThemeComboBoxPrivate::slotLoadThemes()
// Get all message list themes and sort them into alphabetical order.
QList< Theme * > themes = Manager::instance()->themes().values();
qSort(themes.begin(), themes.end(), MessageList::Core::Theme::compareName);
std::sort(themes.begin(), themes.end(), MessageList::Core::Theme::compareName);
for (const Theme *theme : qAsConst(themes)) {
q->addItem(theme->name(), QVariant(theme->id()));
......
......@@ -193,7 +193,7 @@ void CreateDatabaseFileJobPrivate::removeElementFromDataBase(const QVector<Remov
}
}
qSort(indexToRemove);
std::sort(indexToRemove.begin(), indexToRemove.end());
for (int i = (indexToRemove.count() - 1); i >= 0; --i) {
oldDataBaseAddition.remove(indexToRemove.at(i));
}
......
......@@ -117,7 +117,7 @@ QList<quint32> RiceEncodingDecoder::decodeRiceHashesDelta(const RiceDeltaEncodin
// Flipping the bytes, as done above, destroys the sort order. Sort the
// values back.
qSort(list);
std::sort(list.begin(), list.end());
// This flipping is done so that when the vector is interpreted as a string,
// the bytes are in the correct order.
......
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