| 236 | } |
| 237 | |
| 238 | QString extendedStateToStr(const GitPlugin::ExtendedState state) |
| 239 | { |
| 240 | switch (state) { |
| 241 | case GitPlugin::GitXM: |
| 242 | return i18nc("@item file has unstaged changes", "Modified (unstaged)"); |
| 243 | case GitPlugin::GitXD: |
| 244 | return i18nc("@item file was deleted from worktree", "Deleted (unstaged)"); |
| 245 | case GitPlugin::GitXR: |
| 246 | return i18nc("@item file was renamed in worktree", "Renamed (unstaged)"); |
| 247 | case GitPlugin::GitXC: |
| 248 | return i18nc("@item file was copied in worktree", "Copied (unstaged)"); |
| 249 | case GitPlugin::GitMX: |
| 250 | return i18nc("@item file has staged changes", "Modified (staged)"); |
| 251 | case GitPlugin::GitMM: |
| 252 | return i18nc("@item file has both staged and unstaged changes", "Modified (unstaged changes)"); |
| 253 | case GitPlugin::GitMD: |
| 254 | return i18nc("@item file has staged changes and was deleted in worktree", "Modified (unstaged deletion)"); |
| 255 | case GitPlugin::GitAM: |
| 256 | return i18nc("@item file was added to versioncontrolsystem and has unstaged changes", |
| 257 | "Added (unstaged changes)"); |
| 258 | case GitPlugin::GitAD: |
| 259 | return i18nc("@item file was added to versioncontrolsystem and deleted in worktree", |
| 260 | "Added (unstaged deletion)"); |
| 261 | case GitPlugin::GitDR: |
| 262 | return i18nc("@item file was deleted from versioncontrolsystem and renamed in worktree", |
| 263 | "Deleted (unstaged rename)"); |
| 264 | case GitPlugin::GitDC: |
| 265 | return i18nc("@item file was deleted from versioncontrolsystem and copied in worktree", |
| 266 | "Deleted (unstaged copy)"); |
| 267 | case GitPlugin::GitRX: |
| 268 | return i18nc("@item file was renamed in versioncontrolsystem", "Renamed (staged)"); |
| 269 | case GitPlugin::GitRM: |
| 270 | return i18nc("@item file was renamed in versioncontrolsystem and has unstaged changes", |
| 271 | "Renamed (unstaged changes)"); |
| 272 | case GitPlugin::GitRD: |
| 273 | return i18nc("@item file was renamed in versioncontrolsystem and was deleted in worktree", |
| 274 | "Renamed (unstaged deletion)"); |
| 275 | case GitPlugin::GitCX: |
| 276 | return i18nc("@item file was copied in versioncontrolsystem", "Copied"); |
| 277 | case GitPlugin::GitCM: |
| 278 | return i18nc("@item file was copied in versioncontrolsystem and has unstaged changes", |
| 279 | "Copied (unstaged changes)"); |
| 280 | case GitPlugin::GitCD: |
| 281 | return i18nc("@item file was copied in versioncontrolsystem and was deleted in worktree", |
| 282 | "Copied (unstaged deletion)"); |
| 283 | case GitPlugin::GitConflicts: |
| 284 | return i18nc("@item file has unresolved merge conflicts", "Unresolved conflicts"); |
| 285 | case GitPlugin::GitUntracked: |
| 286 | return i18nc("@item file is not under vcs", "Untracked"); |
| 287 | case GitPlugin::GitInvalid: |
| 288 | default: |
| 289 | return i18nc("file in unknown (invalid) state", "Unknown"); |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | bool RepoStatusModel::showInConflicts(const GitPlugin::ExtendedState state) |
| 294 | { |