From 9a581c1b1cf2ec1d3a82c729eaf33cd0f259dd27 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 31 Oct 2023 17:28:23 +0800 Subject: [PATCH] Expose items' domain identifier in FileProviderMaterialisedItemsModel Signed-off-by: Claudio Cambra --- src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp | 3 +++ src/gui/macOS/fileprovidermaterialiseditemsmodel.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp b/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp index 35bce50dc50f6..8b21581bb305b 100644 --- a/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp +++ b/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp @@ -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 FileProviderMaterialisedItemsModel::roleNames() const roleNames.insert({ { IdentifierRole, "identifier" }, { ParentItemIdentifierRole, "parentItemIdentifier" }, + { DomainIdentifierRole, "domainIdentifier" }, { FilenameRole, "fileName" }, { TypeIdentifierRole, "typeIdentifier" }, { SymlinkTargetPathRole, "symlinkTargetPath" }, diff --git a/src/gui/macOS/fileprovidermaterialiseditemsmodel.h b/src/gui/macOS/fileprovidermaterialiseditemsmodel.h index e459e07606dd1..4df4c34c6604b 100644 --- a/src/gui/macOS/fileprovidermaterialiseditemsmodel.h +++ b/src/gui/macOS/fileprovidermaterialiseditemsmodel.h @@ -32,6 +32,7 @@ class FileProviderMaterialisedItemsModel : public QAbstractListModel enum Roles { IdentifierRole = Qt::UserRole + 1, ParentItemIdentifierRole, + DomainIdentifierRole, FilenameRole, TypeIdentifierRole, SymlinkTargetPathRole,