Skip to content

Commit

Permalink
Ensure there is a return in case FolderPathRole of FolderStatusModel
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra authored and backportbot[bot] committed Mar 5, 2024
1 parent 6b2abd5 commit 0c759cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/folderstatusmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,15 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
break;
case FileIdRole:
return subfolderInfo._fileId;
case FolderStatusDelegate::FolderPathRole: {
case FolderStatusDelegate::FolderPathRole:
{
if (const auto folder = subfolderInfo._folder) {
return {folder->path() + subfolderInfo._path};
}
return {};
}
}
return {};
}
case FetchLabel: {
const auto folderInfo = static_cast<SubFolderInfo *>(index.internalPointer());
Expand Down

0 comments on commit 0c759cd

Please sign in to comment.