summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
diff options
context:
space:
mode:
authorSergio Ahumada <sahumada@blackberry.com>2014-02-17 23:52:21 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-22 09:51:14 +0100
commit70ca6f5bba1116ce63cbdf753d041eecc72d8627 (patch)
tree90b668b42c1b81466958b1181b14dea426f5b697 /tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
parentacf1cb94587513c29d05b2114d2704f236b7f1b9 (diff)
Remove qSort usages from core tests
QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I355558fe6a51d00e9aa1f8b1221c6ec0c1e6bb77 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp')
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
index 9788b78771..9e3457a25a 100644
--- a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
@@ -43,6 +43,8 @@
#include <QtGui/QtGui>
+#include <algorithm>
+
class tst_QItemSelectionModel : public QObject
{
Q_OBJECT
@@ -1833,7 +1835,7 @@ void tst_QItemSelectionModel::selectedRows()
QModelIndexList selectedRowIndexes = selectionModel.selectedRows(column);
QCOMPARE(selectedRowIndexes.count(), expectedRows.count());
- qSort(selectedRowIndexes);
+ std::sort(selectedRowIndexes.begin(), selectedRowIndexes.end());
for (int l = 0; l < selectedRowIndexes.count(); ++l) {
QCOMPARE(selectedRowIndexes.at(l).row(), expectedRows.at(l));
QCOMPARE(selectedRowIndexes.at(l).column(), column);
@@ -1893,7 +1895,7 @@ void tst_QItemSelectionModel::selectedColumns()
QModelIndexList selectedColumnIndexes = selectionModel.selectedColumns(row);
QCOMPARE(selectedColumnIndexes.count(), expectedColumns.count());
- qSort(selectedColumnIndexes);
+ std::sort(selectedColumnIndexes.begin(), selectedColumnIndexes.end());
for (int l = 0; l < selectedColumnIndexes.count(); ++l) {
QCOMPARE(selectedColumnIndexes.at(l).column(), expectedColumns.at(l));
QCOMPARE(selectedColumnIndexes.at(l).row(), row);