forked from qt-creator/qt-creator
DiffEditor: Replace bool arguments with flags enum
Change-Id: I70262476d015ba5b73069b149093dac66f7c6008 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
b8ee51fef1
commit
6bc12ff446
@@ -617,7 +617,8 @@ void GitClient::slotStageChunk()
|
||||
if (m_contextController.isNull())
|
||||
return;
|
||||
|
||||
const QString patch = m_contextController->makePatch(false, true);
|
||||
DiffEditorController::PatchOptions options = DiffEditorController::AddPrefix;
|
||||
const QString patch = m_contextController->makePatch(options);
|
||||
if (patch.isEmpty())
|
||||
return;
|
||||
|
||||
@@ -629,7 +630,9 @@ void GitClient::slotUnstageChunk()
|
||||
if (m_contextController.isNull())
|
||||
return;
|
||||
|
||||
const QString patch = m_contextController->makePatch(true, true);
|
||||
DiffEditorController::PatchOptions options = DiffEditorController::AddPrefix;
|
||||
options |= DiffEditorController::Revert;
|
||||
const QString patch = m_contextController->makePatch(options);
|
||||
if (patch.isEmpty())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user