diff options
author | Marcus Tillmanns <[email protected]> | 2022-10-05 15:42:14 +0200 |
---|---|---|
committer | Marcus Tillmanns <[email protected]> | 2022-10-11 08:53:02 +0000 |
commit | ae58d373b02a4a1e3391aa7f6df17d103db1a060 (patch) | |
tree | 8c1d7502c723849dcea408990716fed5ffe16d8b /src/plugins/docker/dockerdevice.h | |
parent | e5e90ad9310f6f662e4eae8dbf2c5b7f8a279168 (diff) |
Add FSEngine FilePath Cache
To speed up file dialogs we introduce a 1 minute cache for
the FilePathInfo.
A new version of "IDevice::iterateDirectories" allows implementations to
provide the FilePathInfo directly.
DockerDevice implements fetching the filePathInfo during
iterateDirectories which greatly improves the speed again.
Change-Id: I24ac16adb2478cbf16a22012e72fcb8910dcdac5
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/docker/dockerdevice.h')
-rw-r--r-- | src/plugins/docker/dockerdevice.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/docker/dockerdevice.h b/src/plugins/docker/dockerdevice.h index 4e7840b9282..8398ee4e235 100644 --- a/src/plugins/docker/dockerdevice.h +++ b/src/plugins/docker/dockerdevice.h @@ -100,7 +100,10 @@ public: bool renameFile(const Utils::FilePath &filePath, const Utils::FilePath &target) const override; Utils::FilePath symLinkTarget(const Utils::FilePath &filePath) const override; void iterateDirectory(const Utils::FilePath &filePath, - const std::function<bool(const Utils::FilePath &)> &callBack, + const Utils::FilePath::IterateDirCallback &callBack, + const Utils::FileFilter &filter) const override; + void iterateDirectory(const Utils::FilePath &filePath, + const Utils::FilePath::IterateDirWithInfoCallback &callBack, const Utils::FileFilter &filter) const override; std::optional<QByteArray> fileContents(const Utils::FilePath &filePath, qint64 limit, @@ -108,6 +111,7 @@ public: bool writeFileContents(const Utils::FilePath &filePath, const QByteArray &data, qint64 offset) const override; + Utils::FilePathInfo filePathInfo(const Utils::FilePath &filePath) const override; QDateTime lastModified(const Utils::FilePath &filePath) const override; qint64 fileSize(const Utils::FilePath &filePath) const override; QFileDevice::Permissions permissions(const Utils::FilePath &filePath) const override; @@ -132,10 +136,6 @@ protected: QVariantMap toMap() const final; private: - void iterateWithFind(const Utils::FilePath &filePath, - const std::function<bool(const Utils::FilePath &)> &callBack, - const Utils::FileFilter &filter) const; - void aboutToBeRemoved() const final; class DockerDevicePrivate *d = nullptr; |