From ed71524aeb14f2106eee8ebf7df5f0cdeece2233 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 30 Oct 2024 12:16:44 +0800 Subject: [PATCH] Add setIsLivePhoto method to FileInfo Signed-off-by: Claudio Cambra --- test/syncenginetestutils.cpp | 7 +++++++ test/syncenginetestutils.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/test/syncenginetestutils.cpp b/test/syncenginetestutils.cpp index 263958832..7671518be 100644 --- a/test/syncenginetestutils.cpp +++ b/test/syncenginetestutils.cpp @@ -223,6 +223,13 @@ void FileInfo::setModTimeKeepEtag(const QString &relativePath, const QDateTime & file->lastModified = modTime; } +void FileInfo::setIsLivePhoto(const QString &relativePath, const bool isLivePhoto) +{ + const auto file = find(relativePath); + Q_ASSERT(file); + file->isLivePhoto = isLivePhoto; +} + void FileInfo::modifyLockState(const QString &relativePath, LockState lockState, int lockType, const QString &lockOwner, const QString &lockOwnerId, const QString &lockEditorId, quint64 lockTime, quint64 lockTimeout) { FileInfo *file = findInvalidatingEtags(relativePath); diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h index 9dd2f6362..dca0eb02b 100644 --- a/test/syncenginetestutils.h +++ b/test/syncenginetestutils.h @@ -142,6 +142,8 @@ public: void setModTimeKeepEtag(const QString &relativePath, const QDateTime &modTime); + void setIsLivePhoto(const QString &relativePath, bool isLivePhoto); + 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;