forked from qt-creator/qt-creator
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:
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
using namespace Core;
|
||||
using namespace Utils;
|
||||
|
||||
namespace DiffEditor {
|
||||
@@ -55,7 +56,8 @@ QString DiffEditorController::makePatch(int fileIndex, int chunkIndex,
|
||||
PatchOptions options) const
|
||||
{
|
||||
return m_document->makePatch(fileIndex, chunkIndex, selection,
|
||||
options & Revert, options & AddPrefix);
|
||||
(options & Revert) ? PatchAction::Revert : PatchAction::Apply,
|
||||
options & AddPrefix);
|
||||
}
|
||||
|
||||
Core::IDocument *DiffEditorController::findOrCreateDocument(const QString &vcsId,
|
||||
|
||||
Reference in New Issue
Block a user