QDirPrivate: pass input QList by cref
Unlike the mutable lvalue reference that was previously used to pass it suggested, the input is never modified, so pass by const reference. Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I5659fe5eab4a8953cd36134735e9e8fd9601f530 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
84277dda00
commit
eef0013086
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user