summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdir.cpp
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2024-02-10 03:10:44 +0200
committerAhmad Samir <a.samirh78@gmail.com>2024-03-21 19:05:02 +0200
commit3c50ad828861bee82e53469deab28b4e286cbeda (patch)
tree36ab6a8c7f88fc7c729bdc1b958c81970b63e95c /src/corelib/io/qdir.cpp
parent0737fca6b2f4b29b7e4eda221147187cf72f96f3 (diff)
QFileSystemEngine: make factory functions return unique_ptr<QABFE>
This makes the ownership of the returned pointer clearer. It also matches reality, some call sites were already storing the pointer in a unique_ptr. Also shorten the function name to "createLegacyEngine", you have to read its docs anyway to figure out what it does. Drive-by changes: less magic numbers; use sliced(); return nullptr instead of `0`. Change-Id: I637759b4160b28b15adf5f6548de336887338dab Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/corelib/io/qdir.cpp')
-rw-r--r--src/corelib/io/qdir.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index be0409a01c..9291201d88 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -362,8 +362,7 @@ inline void QDirPrivate::clearCache(MetaDataClearing mode)
fileCache.fileListsInitialized = false;
fileCache.files.clear();
fileCache.fileInfos.clear();
- fileEngine.reset(
- QFileSystemEngine::resolveEntryAndCreateLegacyEngine(dirEntry, fileCache.metaData));
+ fileEngine = QFileSystemEngine::createLegacyEngine(dirEntry, fileCache.metaData);
}
/*!