mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 23:17:13 +03: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
2 changed files with 4 additions and 0 deletions
|
@ -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 a new issue