From 38b92f5cbab2f24df26f91ee27afeec1103cd085 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 1 Nov 2012 15:24:17 +0100 Subject: [PATCH] Get rid of qSort usages in QDir QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I951a2b9b16fce9d6d29cca0012cdeb06cad79fce Reviewed-by: Thiago Macieira --- src/corelib/io/qdir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 9b3ea2fe2c..c984f28bd0 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -52,7 +52,6 @@ #include "qstring.h" #include "qregexp.h" #include "qvector.h" -#include "qalgorithms.h" #include "qvarlengtharray.h" #include "qfilesystementry_p.h" #include "qfilesystemmetadata_p.h" @@ -64,6 +63,7 @@ # include "private/qcoreglobaldata_p.h" #endif +#include #include QT_BEGIN_NAMESPACE @@ -308,7 +308,7 @@ inline void QDirPrivate::sortFileList(QDir::SortFlags sort, QFileInfoList &l, QScopedArrayPointer si(new QDirSortItem[n]); for (int i = 0; i < n; ++i) si[i].item = l.at(i); - qSort(si.data(), si.data() + n, QDirSortItemComparator(sort)); + std::sort(si.data(), si.data() + n, QDirSortItemComparator(sort)); // put them back in the list(s) if (infos) { for (int i = 0; i < n; ++i)