From f0533a5ab103f7bb53c9b5ec6b90519924aaeeab Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Sun, 20 Oct 2024 17:28:13 +0800 Subject: [PATCH] Add displayFileOwner property to ShareModel Signed-off-by: Claudio Cambra --- src/gui/filedetails/sharemodel.cpp | 5 +++++ src/gui/filedetails/sharemodel.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/gui/filedetails/sharemodel.cpp b/src/gui/filedetails/sharemodel.cpp index 2a314c3fa..2354d704b 100644 --- a/src/gui/filedetails/sharemodel.cpp +++ b/src/gui/filedetails/sharemodel.cpp @@ -1379,6 +1379,11 @@ bool ShareModel::isShareDisabledEncryptedFolder() const return _isShareDisabledEncryptedFolder; } +bool ShareModel::displayFileOwner() const +{ + return _displayFileOwner; +} + QVariantList ShareModel::sharees() const { QVariantList returnSharees; diff --git a/src/gui/filedetails/sharemodel.h b/src/gui/filedetails/sharemodel.h index 09d136f1e..bdb453acb 100644 --- a/src/gui/filedetails/sharemodel.h +++ b/src/gui/filedetails/sharemodel.h @@ -38,6 +38,7 @@ class ShareModel : public QAbstractListModel Q_PROPERTY(bool hasInitialShareFetchCompleted READ hasInitialShareFetchCompleted NOTIFY hasInitialShareFetchCompletedChanged) Q_PROPERTY(bool serverAllowsResharing READ serverAllowsResharing NOTIFY serverAllowsResharingChanged) Q_PROPERTY(QVariantList sharees READ sharees NOTIFY shareesChanged) + Q_PROPERTY(bool displayFileOwner READ displayFileOwner NOTIFY displayFileOwnerChanged) public: enum Roles { @@ -126,6 +127,7 @@ public: [[nodiscard]] QVariantList sharees() const; + [[nodiscard]] bool displayFileOwner() const; [[nodiscard]] Q_INVOKABLE static QString generatePassword(); signals: @@ -143,6 +145,7 @@ signals: void shareesChanged(); void internalLinkReady(); void serverAllowsResharingChanged(); + void displayFileOwnerChanged(); void serverError(const int code, const QString &message) const; void passwordSetError(const QString &shareId, const int code, const QString &message); @@ -246,6 +249,7 @@ private: SyncJournalFileLockInfo _filelockState; QString _privateLinkUrl; QByteArray _fileRemoteId; + bool _displayFileOwner = false; QSharedPointer _manager; -- 2.30.2