mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
Get and set userVisiblePath at item metadata construction time
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
e03edc131d
commit
beb889c2f6
3 changed files with 12 additions and 1 deletions
|
@ -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() &&
|
||||
|
|
|
@ -98,6 +98,8 @@ public:
|
|||
friend bool operator==(const FileProviderItemMetadata &lhs, const FileProviderItemMetadata &rhs);
|
||||
|
||||
private:
|
||||
QString getUserVisiblePath() const;
|
||||
|
||||
QString _identifier;
|
||||
QString _parentItemIdentifier;
|
||||
QString _domainIdentifier;
|
||||
|
@ -130,6 +132,8 @@ private:
|
|||
bool _shared = false;
|
||||
bool _sharedByCurrentUser = false;
|
||||
bool _trashed = false;
|
||||
|
||||
QString _userVisiblePath;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -89,10 +89,12 @@ FileProviderItemMetadata FileProviderItemMetadata::fromNSFileProviderItem(const
|
|||
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";
|
||||
|
||||
|
|
Loading…
Reference in a new issue