]> cloud.milkyroute.net Git - dolphin.git/commitdiff
port to std::stable_sort
authorLaurent Montel <montel@kde.org>
Sun, 10 Mar 2019 09:51:24 +0000 (10:51 +0100)
committerLaurent Montel <montel@kde.org>
Sun, 10 Mar 2019 09:51:27 +0000 (10:51 +0100)
src/kitemviews/kfileitemmodel.cpp
src/kitemviews/kitemlistview.cpp
src/settings/services/servicessettingspage.cpp

index a6d74a77b9fc7273d3f7bd94a167e6d22c016dfc..fc14c79c1c270ac30bfca4422597b4147cd078b3 100644 (file)
@@ -1124,7 +1124,7 @@ void KFileItemModel::slotRefreshItems(const QList<QPair<KFileItem, KFileItem> >&
     }
 
     // Extract the item-ranges out of the changed indexes
     }
 
     // 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);
 }
     const KItemRangeList itemRangeList = KItemRangeList::fromSortedContainer(indexes);
     emitItemsChangedAndTriggerResorting(itemRangeList, changedRoles);
 }
index 9f1380c75c08e33c4ca9aba127b90164cacf8869..db258eb3969ef748acfd9cd42e61bb5bab705040 100644 (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.
         // 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);
         for (int i = itemsToMove.count() - 1; i >= 0; --i) {
             KItemListWidget* widget = m_visibleItems.value(itemsToMove[i]);
             Q_ASSERT(widget);
index 45acccd9fd1f6ec6624aeefab15512488ef3b32d..ff00ca1774d33a8fc3b4e489285882bfb5f5557d 100644 (file)
@@ -82,7 +82,7 @@ ServicesSettingsPage::ServicesSettingsPage(QWidget* parent) :
     topLayout->addWidget(downloadButton);
 
     m_enabledVcsPlugins = VersionControlSettings::enabledPlugins();
     topLayout->addWidget(downloadButton);
 
     m_enabledVcsPlugins = VersionControlSettings::enabledPlugins();
-    qSort(m_enabledVcsPlugins);
+    std::sort(m_enabledVcsPlugins.begin(), m_enabledVcsPlugins.end());
 }
 
 ServicesSettingsPage::~ServicesSettingsPage()
 }
 
 ServicesSettingsPage::~ServicesSettingsPage()