Ensure there is a return in case FolderPathRole of FolderStatusModel
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Sun, 3 Mar 2024 18:19:05 +0000 (02:19 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 5 Mar 2024 03:48:05 +0000 (11:48 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/folderstatusmodel.cpp

index d5d02188521f3e404fb36f83e8fcdb2c1df82639..cc3aede3617158e643a8b911c01546613a912f48 100644 (file)
@@ -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());