From 886eb76aeae5ba2cff6c4f0456ee14e63b19a9f7 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Wed, 28 Feb 2024 23:52:38 +0200 Subject: QAbstractFileEngine: add a path parameter to beginEntryList() Change beginEntryList() to take a path parameter, which it passes on to the QAFEIterator constructor; setting the path at construction makes more sense, because typically the path isn't supposed to change during iteration, and this simplifies the code at the call site. Remove setPath(), the last usage in Qt repos was in QtCreator, and that has been ported away from it. Change-Id: I01baa688e0f9b582aacb63d7d98a794276e58034 Reviewed-by: Thiago Macieira --- src/corelib/io/qfsfileengine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/corelib/io/qfsfileengine.cpp') diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index df8dd494eec..ee96e801f26 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -792,9 +792,10 @@ qint64 QFSFileEnginePrivate::writeFdFh(const char *data, qint64 len) \internal */ QAbstractFileEngine::IteratorUniquePtr -QFSFileEngine::beginEntryList(QDir::Filters filters, const QStringList &filterNames) +QFSFileEngine::beginEntryList(const QString &path, QDir::Filters filters, + const QStringList &filterNames) { - return std::make_unique(filters, filterNames); + return std::make_unique(path, filters, filterNames); } #endif // QT_NO_FILESYSTEMITERATOR -- cgit v1.2.3