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

@@ -218,8 +218,8 @@ void UnifiedDiffEditorWidget::addContextMenuActions(QMenu *menu, int fileIndex,
menu->addSeparator();
m_controller.addCodePasterAction(menu, fileIndex, chunkIndex);
m_controller.addApplyRevertAction(menu, fileIndex, chunkIndex, LeftSide);
m_controller.addApplyRevertAction(menu, fileIndex, chunkIndex, RightSide);
m_controller.addPatchAction(menu, fileIndex, chunkIndex, PatchAction::Apply);
m_controller.addPatchAction(menu, fileIndex, chunkIndex, PatchAction::Revert);
m_controller.addExtraActions(menu, fileIndex, chunkIndex, selection);
}