diff --git a/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp b/src/gui/macOS/fileprovidermaterialiseditemsmodel.cpp index e9c8c481e..c2b33c805 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 81d162446..70d2bcd6b 100644 --- a/src/gui/macOS/fileprovidermaterialiseditemsmodel.h +++ b/src/gui/macOS/fileprovidermaterialiseditemsmodel.h @@ -64,6 +64,7 @@ public: 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;