diff --git a/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp b/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp index e9c8c481eaa1..c2b33c80576d 100644 --- a/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp +++ b/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp @@ -98,6 +98,42 @@ QVariant FileProviderMaterialisedItemsModel::data(const QModelIndex &index, int return {}; } +QHash FileProviderMaterialisedItemsModel::roleNames() const +{ + auto roleNames = QAbstractListModel::roleNames(); + roleNames.insert({ + { IdentifierRole, "identifier" }, + { ParentItemIdentifierRole, "parentItemIdentifier" }, + { FilenameRole, "fileName" }, + { TypeIdentifierRole, "typeIdentifier" }, + { SymlinkTargetPathRole, "symlinkTargetPath" }, + { UploadingErrorRole, "uploadingError" }, + { DownloadingErrorRole, "downloadingError" }, + { MostRecentEditorNameRole, "mostRecentEditorName" }, + { OwnerNameRole, "ownerName" }, + { ContentModificationDateRole, "contentModificationDate" }, + { CreationDateRole, "creationDate" }, + { LastUsedDateRole, "lastUsedDate" }, + { ContentVersionRole, "contentVersion" }, + { MetadataVersionRole, "metadataVersion" }, + { TagDataRole, "tagData" }, + { CapabilitiesRole, "capabilities" }, + { FileSystemFlagsRole, "fileSystemFlags" }, + { ChildItemCountRole, "childItemCount" }, + { TypeOsCodeRole, "typeOsCode" }, + { CreatorOsCodeRole, "creatorOsCode" }, + { DocumentSizeRole, "documentSize" }, + { MostRecentVersionDownloadedRole, "mostRecentVersionDownloaded" }, + { UploadingRole, "uploading" }, + { UploadedRole, "uploaded" }, + { DownloadingRole, "downloading" }, + { DownloadedRole, "downloaded" }, + { SharedRole, "shared" }, + { SharedByCurrentUserRole, "sharedByCurrentUser" }, + }); + return roleNames; +} + QVector FileProviderMaterialisedItemsModel::items() const { return _items; diff --git a/src/gui/macOS/fileprovidermaterialiseditemsmodel.h b/src/gui/macOS/fileprovidermaterialiseditemsmodel.h index 81d1624469b1..70d2bcd6ba16 100644 --- a/src/gui/macOS/fileprovidermaterialiseditemsmodel.h +++ b/src/gui/macOS/fileprovidermaterialiseditemsmodel.h @@ -64,6 +64,7 @@ class FileProviderMaterialisedItemsModel : public QAbstractListModel explicit FileProviderMaterialisedItemsModel(QObject *parent = nullptr); int rowCount(const QModelIndex &parent = {}) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + QHash roleNames() const override; QVector items() const;