From: Claudio Cambra Date: Thu, 13 Jul 2023 01:27:07 +0000 (+0800) Subject: Add sharingAvailable property to FileDetails class X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~92^2^2~89^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=38d82dfb5f6030fc3f336bfa9f6eadd164a4a4aa;p=nextcloud-desktop.git Add sharingAvailable property to FileDetails class Signed-off-by: Claudio Cambra --- diff --git a/src/gui/filedetails/filedetails.cpp b/src/gui/filedetails/filedetails.cpp index 37ef696c6..2e24dc265 100644 --- a/src/gui/filedetails/filedetails.cpp +++ b/src/gui/filedetails/filedetails.cpp @@ -172,4 +172,9 @@ void FileDetails::updateFileTagModel(const Folder * const folder) Q_EMIT fileTagModelChanged(); } +bool FileDetails::sharingAvailable() const +{ + return _sharingAvailable; +} + } // namespace OCC diff --git a/src/gui/filedetails/filedetails.h b/src/gui/filedetails/filedetails.h index a1fbf9ac5..2834981af 100644 --- a/src/gui/filedetails/filedetails.h +++ b/src/gui/filedetails/filedetails.h @@ -38,6 +38,7 @@ class FileDetails : public QObject Q_PROPERTY(QString lockExpireString READ lockExpireString NOTIFY lockExpireStringChanged) Q_PROPERTY(bool isFolder READ isFolder NOTIFY isFolderChanged) Q_PROPERTY(FileTagModel* fileTagModel READ fileTagModel NOTIFY fileTagModelChanged) + Q_PROPERTY(bool sharingAvailable READ sharingAvailable NOTIFY fileChanged) public: explicit FileDetails(QObject *parent = nullptr); @@ -50,6 +51,7 @@ public: [[nodiscard]] QString lockExpireString() const; [[nodiscard]] bool isFolder() const; [[nodiscard]] FileTagModel *fileTagModel() const; + [[nodiscard]] bool sharingAvailable() const; public slots: void setLocalPath(const QString &localPath); @@ -80,6 +82,7 @@ private: QLocale _locale; std::unique_ptr _fileTagModel; + bool _sharingAvailable = true; }; } // namespace OCC