summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qitemselectionmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/itemmodels/qitemselectionmodel.cpp')
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel.cpp b/src/corelib/itemmodels/qitemselectionmodel.cpp
index d1cbd7f461..e05b76f5da 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.cpp
+++ b/src/corelib/itemmodels/qitemselectionmodel.cpp
@@ -43,6 +43,8 @@
#include <private/qitemselectionmodel_p.h>
#include <qdebug.h>
+#include <algorithm>
+
#ifndef QT_NO_ITEMVIEWS
QT_BEGIN_NAMESPACE
@@ -1007,8 +1009,8 @@ void QItemSelectionModelPrivate::_q_layoutChanged(const QList<QPersistentModelIn
if (hint != QAbstractItemModel::VerticalSortHint) {
// sort the "new" selection, as preparation for merging
- qStableSort(savedPersistentIndexes.begin(), savedPersistentIndexes.end());
- qStableSort(savedPersistentCurrentIndexes.begin(), savedPersistentCurrentIndexes.end());
+ std::stable_sort(savedPersistentIndexes.begin(), savedPersistentIndexes.end());
+ std::stable_sort(savedPersistentCurrentIndexes.begin(), savedPersistentCurrentIndexes.end());
// update the selection by merging the individual indexes
ranges = mergeIndexes(savedPersistentIndexes);
@@ -1019,8 +1021,8 @@ void QItemSelectionModelPrivate::_q_layoutChanged(const QList<QPersistentModelIn
savedPersistentCurrentIndexes.clear();
} else {
// sort the "new" selection, as preparation for merging
- qStableSort(savedPersistentRowLengths.begin(), savedPersistentRowLengths.end());
- qStableSort(savedPersistentCurrentRowLengths.begin(), savedPersistentCurrentRowLengths.end());
+ std::stable_sort(savedPersistentRowLengths.begin(), savedPersistentRowLengths.end());
+ std::stable_sort(savedPersistentCurrentRowLengths.begin(), savedPersistentCurrentRowLengths.end());
// update the selection by merging the individual indexes
ranges = mergeRowLengths(savedPersistentRowLengths);