diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2013-09-03 00:49:40 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-05 14:45:38 +0200 |
commit | d757b5251fd2e0f98d54bb86296ce538aa50d6b6 (patch) | |
tree | 7b5e648323552a2d9b47fa34318b398eb9bc0b4e /src/widgets/itemviews/qlistwidget.cpp | |
parent | 1a844db508ec8350b24661e729f9bff8097ef1b6 (diff) |
Remove deprecated algorithms usage from itemviews
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html
Change-Id: I68efdd1b08b94a737345644a5b588ffff5caac63
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'src/widgets/itemviews/qlistwidget.cpp')
-rw-r--r-- | src/widgets/itemviews/qlistwidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp index 1573e97981..27abfb8eb4 100644 --- a/src/widgets/itemviews/qlistwidget.cpp +++ b/src/widgets/itemviews/qlistwidget.cpp @@ -304,7 +304,7 @@ void QListModel::sort(int column, Qt::SortOrder order) } LessThan compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan); - qSort(sorting.begin(), sorting.end(), compare); + std::sort(sorting.begin(), sorting.end(), compare); QModelIndexList fromIndexes; QModelIndexList toIndexes; for (int r = 0; r < sorting.count(); ++r) { @@ -338,7 +338,7 @@ void QListModel::ensureSorted(int column, Qt::SortOrder order, int start, int en } LessThan compare = (order == Qt::AscendingOrder ? &itemLessThan : &itemGreaterThan); - qSort(sorting.begin(), sorting.end(), compare); + std::sort(sorting.begin(), sorting.end(), compare); QModelIndexList oldPersistentIndexes = persistentIndexList(); QModelIndexList newPersistentIndexes = oldPersistentIndexes; @@ -1832,7 +1832,7 @@ void QListWidget::dropEvent(QDropEvent *event) { if (persIndexes.contains(topIndex)) return; - qSort(persIndexes); // The dropped items will remain in the same visual order. + std::sort(persIndexes.begin(), persIndexes.end()); // The dropped items will remain in the same visual order. QPersistentModelIndex dropRow = model()->index(row, col, topIndex); |