From: Claudio Cambra Date: Tue, 11 Apr 2023 09:41:56 +0000 (+0800) Subject: Get account and relativeserverpath in constructor for FileTagModel X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~96^2^2~49^2~28 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=84c8392491efc0992a33efd551159e1ed3eccb6b;p=nextcloud-desktop.git Get account and relativeserverpath in constructor for FileTagModel Signed-off-by: Claudio Cambra --- diff --git a/src/gui/filetagmodel.cpp b/src/gui/filetagmodel.cpp index cfd17880d..eaa11f197 100644 --- a/src/gui/filetagmodel.cpp +++ b/src/gui/filetagmodel.cpp @@ -14,8 +14,16 @@ #include "filetagmodel.h" -FileTagModel::FileTagModel(QObject *parent) +#include "libsync/networkjobs.h" + +namespace OCC { + +FileTagModel::FileTagModel(const QString &serverRelativePath, + const AccountPtr &account, + QObject * const parent) : QAbstractListModel(parent) + , _serverRelativePath(serverRelativePath) + , _account(account) { } @@ -37,3 +45,4 @@ QVariant FileTagModel::data(const QModelIndex &index, int role) const // FIXME: Implement me! return QVariant(); } +} diff --git a/src/gui/filetagmodel.h b/src/gui/filetagmodel.h index 075b64e8a..a18022eb9 100644 --- a/src/gui/filetagmodel.h +++ b/src/gui/filetagmodel.h @@ -16,12 +16,16 @@ #include +#include "libsync/account.h" + +namespace OCC { + class FileTagModel : public QAbstractListModel { Q_OBJECT public: - explicit FileTagModel(QObject *parent = nullptr); + explicit FileTagModel(const QString &serverRelativePath, const AccountPtr &account, QObject * const parent = nullptr); // Basic functionality: [[nodiscard]] int rowCount(const QModelIndex &parent = QModelIndex()) const override; @@ -29,4 +33,8 @@ public: [[nodiscard]] QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; private: + QString _serverRelativePath; + AccountPtr _account; }; + +}