diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 26f30fba6a..5a6f78df63 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -276,7 +276,7 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt return r < 0; } -inline void QDirPrivate::sortFileList(QDir::SortFlags sort, QFileInfoList &l, +inline void QDirPrivate::sortFileList(QDir::SortFlags sort, const QFileInfoList &l, QStringList *names, QFileInfoList *infos) { // names and infos are always empty lists or 0 here diff --git a/src/corelib/io/qdir_p.h b/src/corelib/io/qdir_p.h index 7f90f8d167..9f6be858e5 100644 --- a/src/corelib/io/qdir_p.h +++ b/src/corelib/io/qdir_p.h @@ -44,7 +44,7 @@ public: void initFileEngine(); void initFileLists(const QDir &dir) const; - static void sortFileList(QDir::SortFlags, QFileInfoList &, QStringList *, QFileInfoList *); + static void sortFileList(QDir::SortFlags, const QFileInfoList &, QStringList *, QFileInfoList *); static inline QChar getFilterSepChar(const QString &nameFilter);