Skip to content

Commit

Permalink
Simply pass AccountPtr to updateFileTagModel
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Oct 21, 2024
1 parent de4460f commit 6574625
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/gui/filedetails/filedetails.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ void FileDetails::setLocalPath(const QString &localPath)

const auto account = _folder->accountState()->account();
_sharingAvailable = account->capabilities().shareAPI();
updateFileTagModel(account);

Q_EMIT fileChanged();
}
Expand Down Expand Up @@ -167,10 +168,8 @@ FileTagModel *FileDetails::fileTagModel() const
return _fileTagModel.get();
}

void FileDetails::updateFileTagModel(const Folder * const folder)
void FileDetails::updateFileTagModel(const AccountPtr &account)
{
Q_ASSERT(folder);
const auto account = folder->accountState()->account();
Q_ASSERT(account);

const auto serverRelPath = QString(folder->remotePathTrailingSlash() + name());
Expand Down
2 changes: 1 addition & 1 deletion src/gui/filedetails/filedetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public slots:
private slots:
void refreshFileDetails();
void updateLockExpireString();
void updateFileTagModel(const OCC::Folder * const folder);
void updateFileTagModel(const OCC::AccountPtr &account);

private:
QString _localPath;
Expand Down

0 comments on commit 6574625

Please sign in to comment.