Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 1aeea4a6 authored by Laurent Montel's avatar Laurent Montel 😁

port to std::stable_sort

parent 1a325946
......@@ -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()
......
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