diff --git a/src/gui/macOS/fileprovideritemmetadata.cpp b/src/gui/macOS/fileprovideritemmetadata.cpp index 9a9d38047385..0d7421abc3e9 100644 --- a/src/gui/macOS/fileprovideritemmetadata.cpp +++ b/src/gui/macOS/fileprovideritemmetadata.cpp @@ -168,6 +168,11 @@ bool FileProviderItemMetadata::sharedByCurrentUser() const return _sharedByCurrentUser; } +QString FileProviderItemMetadata::userVisiblePath() const +{ + return _userVisiblePath; +} + bool operator==(const FileProviderItemMetadata &lhs, const FileProviderItemMetadata &rhs) { return lhs.identifier() == rhs.identifier() && diff --git a/src/gui/macOS/fileprovideritemmetadata.h b/src/gui/macOS/fileprovideritemmetadata.h index cde6508de5b6..59b45733ad07 100644 --- a/src/gui/macOS/fileprovideritemmetadata.h +++ b/src/gui/macOS/fileprovideritemmetadata.h @@ -98,6 +98,8 @@ class FileProviderItemMetadata friend bool operator==(const FileProviderItemMetadata &lhs, const FileProviderItemMetadata &rhs); private: + QString getUserVisiblePath() const; + QString _identifier; QString _parentItemIdentifier; QString _domainIdentifier; @@ -130,6 +132,8 @@ class FileProviderItemMetadata bool _shared = false; bool _sharedByCurrentUser = false; bool _trashed = false; + + QString _userVisiblePath; }; } diff --git a/src/gui/macOS/fileprovideritemmetadata_mac.mm b/src/gui/macOS/fileprovideritemmetadata_mac.mm index daefc5721953..822872b281cf 100644 --- a/src/gui/macOS/fileprovideritemmetadata_mac.mm +++ b/src/gui/macOS/fileprovideritemmetadata_mac.mm @@ -89,10 +89,12 @@ QString nsNameComponentsToLocalisedQString(NSPersonNameComponents *const nameCom metadata._shared = bridgedNsFileProviderItem.shared; metadata._sharedByCurrentUser = bridgedNsFileProviderItem.sharedByCurrentUser; + metadata._userVisiblePath = metadata.getUserVisiblePath(); + return metadata; } -QString FileProviderItemMetadata::userVisiblePath() const +QString FileProviderItemMetadata::getUserVisiblePath() const { qCDebug(lcMacImplFileProviderItemMetadata) << "Getting user visible path";