port to std::stable_sort

This commit is contained in:
Laurent Montel 2019-03-10 10:51:24 +01:00
parent 1a32594617
commit 1aeea4a6ab
3 changed files with 3 additions and 3 deletions

View file

@ -1124,7 +1124,7 @@ void KFileItemModel::slotRefreshItems(const QList<QPair<KFileItem, KFileItem> >&
}
// Extract the item-ranges out of the changed indexes
qSort(indexes);
std::sort(indexes.begin(), indexes.end());
const KItemRangeList itemRangeList = KItemRangeList::fromSortedContainer(indexes);
emitItemsChangedAndTriggerResorting(itemRangeList, changedRoles);
}

View file

@ -1041,7 +1041,7 @@ void KItemListView::slotItemsInserted(const KItemRangeList& itemRanges)
// Update the indexes of all KItemListWidget instances that are located
// after the inserted items. It is important to adjust the indexes in the order
// from the highest index to the lowest index to prevent overlaps when setting the new index.
qSort(itemsToMove);
std::sort(itemsToMove.begin(), itemsToMove.end());
for (int i = itemsToMove.count() - 1; i >= 0; --i) {
KItemListWidget* widget = m_visibleItems.value(itemsToMove[i]);
Q_ASSERT(widget);

View file

@ -82,7 +82,7 @@ ServicesSettingsPage::ServicesSettingsPage(QWidget* parent) :
topLayout->addWidget(downloadButton);
m_enabledVcsPlugins = VersionControlSettings::enabledPlugins();
qSort(m_enabledVcsPlugins);
std::sort(m_enabledVcsPlugins.begin(), m_enabledVcsPlugins.end());
}
ServicesSettingsPage::~ServicesSettingsPage()