PatchTool: Introduce PatchAction enum

Add static PatchTool::confirmPatching() and reuse it
in two places.

Use Tr::tr() inside PatchTool.

Change-Id: I70779619dbb58ab6e46a585bbeff51588ccb2f53
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-09-29 15:31:27 +02:00
parent 2d360db2c3
commit b67c868f75
14 changed files with 140 additions and 131 deletions

View File

@@ -1107,8 +1107,9 @@ void SideBySideDiffEditorWidget::contextMenuRequested(DiffSide side, QMenu *menu
{
menu->addSeparator();
const PatchAction patchAction = side == LeftSide ? PatchAction::Apply : PatchAction::Revert;
m_controller.addCodePasterAction(menu, fileIndex, chunkIndex);
m_controller.addApplyRevertAction(menu, fileIndex, chunkIndex, side);
m_controller.addPatchAction(menu, fileIndex, chunkIndex, patchAction);
m_controller.addExtraActions(menu, fileIndex, chunkIndex, selection);
}