mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
port to std::stable_sort
This commit is contained in:
parent
1a32594617
commit
1aeea4a6ab
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue