From 2e765c6fef776061e0de2cffbfb2a27e132fe97b Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Sun, 20 Oct 2024 17:29:15 +0800 Subject: [PATCH] Add fileOwnerDisplayName 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 2354d704b..76c2feda1 100644 --- a/src/gui/filedetails/sharemodel.cpp +++ b/src/gui/filedetails/sharemodel.cpp @@ -1384,6 +1384,11 @@ bool ShareModel::displayFileOwner() const return _displayFileOwner; } +QString ShareModel::fileOwnerDisplayName() const +{ + return _fileOwnerDisplayName; +} + QVariantList ShareModel::sharees() const { QVariantList returnSharees; diff --git a/src/gui/filedetails/sharemodel.h b/src/gui/filedetails/sharemodel.h index bdb453acb..0bc4647d3 100644 --- a/src/gui/filedetails/sharemodel.h +++ b/src/gui/filedetails/sharemodel.h @@ -39,6 +39,7 @@ class ShareModel : public QAbstractListModel Q_PROPERTY(bool serverAllowsResharing READ serverAllowsResharing NOTIFY serverAllowsResharingChanged) Q_PROPERTY(QVariantList sharees READ sharees NOTIFY shareesChanged) Q_PROPERTY(bool displayFileOwner READ displayFileOwner NOTIFY displayFileOwnerChanged) + Q_PROPERTY(QString fileOwnerDisplayName READ fileOwnerDisplayName NOTIFY fileOwnerDisplayNameChanged) public: enum Roles { @@ -128,6 +129,7 @@ public: [[nodiscard]] QVariantList sharees() const; [[nodiscard]] bool displayFileOwner() const; + [[nodiscard]] QString fileOwnerDisplayName() const; [[nodiscard]] Q_INVOKABLE static QString generatePassword(); signals: @@ -146,6 +148,7 @@ signals: void internalLinkReady(); void serverAllowsResharingChanged(); void displayFileOwnerChanged(); + void fileOwnerDisplayNameChanged(); void serverError(const int code, const QString &message) const; void passwordSetError(const QString &shareId, const int code, const QString &message); @@ -250,6 +253,7 @@ private: QString _privateLinkUrl; QByteArray _fileRemoteId; bool _displayFileOwner = false; + QString _fileOwnerDisplayName; QSharedPointer _manager; -- 2.30.2