mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
[CSE] Add FileIdRole for the FolderStatusModel
This way we can actually request the id from outside of the model.
This commit is contained in:
parent
9870f39dcb
commit
e2091bb0a3
@ -163,6 +163,8 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
|
||||
return QColor(Qt::red);
|
||||
}
|
||||
break;
|
||||
case FileIdRole:
|
||||
return x._fileId;
|
||||
case FolderStatusDelegate::FolderPathRole: {
|
||||
auto f = x._folder;
|
||||
if (!f)
|
||||
|
||||
@ -37,6 +37,8 @@ class FolderStatusModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum {FileIdRole = Qt::UserRole+1};
|
||||
|
||||
FolderStatusModel(QObject *parent = 0);
|
||||
~FolderStatusModel();
|
||||
void setAccountState(const AccountState *accountState);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user