From 04680915193877e8adcd5a493e590d8b2ce28390 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 11 Jul 2023 15:37:29 +0800 Subject: [PATCH] Add find method to DiskFileModifier class in SyncEngineTestUtils Signed-off-by: Claudio Cambra --- test/syncenginetestutils.cpp | 6 ++++++ test/syncenginetestutils.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/test/syncenginetestutils.cpp b/test/syncenginetestutils.cpp index 82aa701664d17..88ece82c1e7e9 100644 --- a/test/syncenginetestutils.cpp +++ b/test/syncenginetestutils.cpp @@ -113,6 +113,12 @@ void DiskFileModifier::setE2EE([[maybe_unused]] const QString &relativePath, [[m { } +QFile DiskFileModifier::find(const QString &relativePath) const +{ + const auto path = _rootDir.filePath(relativePath); + return QFile(path); +} + FileInfo FileInfo::A12_B12_C12_S12() { FileInfo fi { QString {}, { diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h index 4f9c552ba40b0..3a299f3ac927e 100644 --- a/test/syncenginetestutils.h +++ b/test/syncenginetestutils.h @@ -108,6 +108,8 @@ class DiskFileModifier : public FileModifier void setModTime(const QString &relativePath, const QDateTime &modTime) override; void modifyLockState(const QString &relativePath, LockState lockState, int lockType, const QString &lockOwner, const QString &lockOwnerId, const QString &lockEditorId, quint64 lockTime, quint64 lockTimeout) override; void setE2EE(const QString &relativepath, const bool enabled) override; + + [[nodiscard]] QFile find(const QString &relativePath) const; }; class FileInfo : public FileModifier