VcsBaseEditor: Get rid of diffChunkApplied()

Drop unused arg from diffChunkReverted().

Change-Id: I5531645d317d62ae92cd0e63dadd583f8ab8996d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-09-29 16:09:29 +02:00
parent b67c868f75
commit 460f347757
3 changed files with 4 additions and 11 deletions

View File

@@ -234,9 +234,7 @@ void GitEditorWidget::applyDiffChunk(const DiffChunk& chunk, PatchAction patchAc
else else
VcsOutputWindow::append(errorMessage); VcsOutputWindow::append(errorMessage);
if (patchAction == PatchAction::Revert) if (patchAction == PatchAction::Revert)
emit diffChunkReverted(chunk); emit diffChunkReverted();
else
emit diffChunkApplied(chunk);
} else { } else {
VcsOutputWindow::appendError(errorMessage); VcsOutputWindow::appendError(errorMessage);
} }

View File

@@ -1590,12 +1590,8 @@ void VcsBaseEditorWidget::slotApplyDiffChunk(const DiffChunk &chunk, PatchAction
if (!PatchTool::confirmPatching(this, patchAction)) if (!PatchTool::confirmPatching(this, patchAction))
return; return;
if (applyDiffChunk(chunk, patchAction)) { if (applyDiffChunk(chunk, patchAction) && patchAction == PatchAction::Revert)
if (patchAction == PatchAction::Revert) // TODO: make just one signal emit diffChunkReverted();
emit diffChunkReverted(chunk);
else
emit diffChunkApplied(chunk);
}
} }
// Tagging of editors for re-use. // Tagging of editors for re-use.

View File

@@ -199,8 +199,7 @@ signals:
void describeRequested(const Utils::FilePath &source, const QString &change); void describeRequested(const Utils::FilePath &source, const QString &change);
void annotateRevisionRequested(const Utils::FilePath &workingDirectory, const QString &file, void annotateRevisionRequested(const Utils::FilePath &workingDirectory, const QString &file,
const QString &change, int lineNumber); const QString &change, int lineNumber);
void diffChunkApplied(const VcsBase::DiffChunk &dc); void diffChunkReverted();
void diffChunkReverted(const VcsBase::DiffChunk &dc);
protected: protected:
void contextMenuEvent(QContextMenuEvent *e) override; void contextMenuEvent(QContextMenuEvent *e) override;