From aa2adb8d0072eccb549692d56168b8fde33f7b4f Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Thu, 11 Jun 2009 16:27:29 +0200 Subject: Sort QDir with qSort instead of qStableSort The commit 3e7fc907e5cc1937fb98bf4581cee960fe3d4e7a have changed the behavior of sorting of QDir. This revert to the old behavior with qSort instead of qStableSort. Reviewed-by: Alexis --- src/corelib/io/qdir.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 302d9b5..b6900bc 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -289,7 +289,7 @@ inline void QDirPrivate::sortFileList(QDir::SortFlags sort, QFileInfoList &l, QDirSortItem *si = new QDirSortItem[n]; for (int i = 0; i < n; ++i) si[i].item = l.at(i); - qStableSort(si, si + n, QDirSortItemComparator(sort)); + qSort(si, si+n, QDirSortItemComparator(sort)); // put them back in the list(s) if(infos) { for (int i = 0; i < n; ++i) @@ -1316,7 +1316,6 @@ QStringList QDir::entryList(Filters filters, SortFlags sort) const \sa entryList(), setNameFilters(), setSorting(), setFilter(), isReadable(), exists() */ - QFileInfoList QDir::entryInfoList(Filters filters, SortFlags sort) const { Q_D(const QDir); -- cgit v0.12