Constify openLocalFolder

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-05-10 13:10:43 +08:00 committed by Matthieu Gallien
parent e60bbf97d8
commit 5611f876b0
2 changed files with 3 additions and 5 deletions

View file

@ -925,11 +925,9 @@ UnifiedSearchResultsListModel *User::getUnifiedSearchResultsListModel() const
return _unifiedSearchResultsModel;
}
void User::openLocalFolder()
void User::openLocalFolder() const
{
const auto folder = getFolder();
if (folder) {
if (const auto folder = getFolder()) {
QDesktopServices::openUrl(QUrl::fromLocalFile(folder->path()));
}
}

View file

@ -76,7 +76,7 @@ public:
[[nodiscard]] Folder *getFolder() const;
ActivityListModel *getActivityModel();
[[nodiscard]] UnifiedSearchResultsListModel *getUnifiedSearchResultsListModel() const;
void openLocalFolder();
void openLocalFolder() const;
void openFolderLocallyOrInBrowser(const QString &fullRemotePath);
[[nodiscard]] QString name() const;
[[nodiscard]] QString server(bool shortened = true) const;