mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Get account and relativeserverpath in constructor for FileTagModel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
f763bd00fb
commit
84c8392491
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,12 +16,16 @@
|
||||
|
||||
#include <QAbstractListModel>
|
||||
|
||||
#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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user