From: Claudio Cambra Date: Sun, 20 Oct 2024 09:29:15 +0000 (+0800) Subject: Add fileOwnerDisplayName property to ShareModel X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~5^2~14^2~18 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2e765c6fef776061e0de2cffbfb2a27e132fe97b;p=nextcloud-desktop.git Add fileOwnerDisplayName property to ShareModel Signed-off-by: Claudio Cambra --- 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;