Expose items' domain identifier in FileProviderMaterialisedItemsModel

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-10-31 17:28:23 +08:00
parent 0b961e9e17
commit c763a9a227
No known key found for this signature in database
GPG key ID: C839200C384636B0
2 changed files with 4 additions and 0 deletions

View file

@ -44,6 +44,8 @@ QVariant FileProviderMaterialisedItemsModel::data(const QModelIndex &index, int
return item.identifier();
case ParentItemIdentifierRole:
return item.parentItemIdentifier();
case DomainIdentifierRole:
return item.domainIdentifier();
case TypeIdentifierRole:
return item.typeIdentifier();
case SymlinkTargetPathRole:
@ -108,6 +110,7 @@ QHash<int, QByteArray> FileProviderMaterialisedItemsModel::roleNames() const
roleNames.insert({
{ IdentifierRole, "identifier" },
{ ParentItemIdentifierRole, "parentItemIdentifier" },
{ DomainIdentifierRole, "domainIdentifier" },
{ FilenameRole, "fileName" },
{ TypeIdentifierRole, "typeIdentifier" },
{ SymlinkTargetPathRole, "symlinkTargetPath" },

View file

@ -32,6 +32,7 @@ public:
enum Roles {
IdentifierRole = Qt::UserRole + 1,
ParentItemIdentifierRole,
DomainIdentifierRole,
FilenameRole,
TypeIdentifierRole,
SymlinkTargetPathRole,