diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp index 5c5254a8ae5..305d4f1198c 100644 --- a/src/plugins/git/giteditor.cpp +++ b/src/plugins/git/giteditor.cpp @@ -234,9 +234,7 @@ void GitEditorWidget::applyDiffChunk(const DiffChunk& chunk, PatchAction patchAc else VcsOutputWindow::append(errorMessage); if (patchAction == PatchAction::Revert) - emit diffChunkReverted(chunk); - else - emit diffChunkApplied(chunk); + emit diffChunkReverted(); } else { VcsOutputWindow::appendError(errorMessage); } diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp index 1d396eb4532..2ca4c01d2c5 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.cpp +++ b/src/plugins/vcsbase/vcsbaseeditor.cpp @@ -1590,12 +1590,8 @@ void VcsBaseEditorWidget::slotApplyDiffChunk(const DiffChunk &chunk, PatchAction if (!PatchTool::confirmPatching(this, patchAction)) return; - if (applyDiffChunk(chunk, patchAction)) { - if (patchAction == PatchAction::Revert) // TODO: make just one signal - emit diffChunkReverted(chunk); - else - emit diffChunkApplied(chunk); - } + if (applyDiffChunk(chunk, patchAction) && patchAction == PatchAction::Revert) + emit diffChunkReverted(); } // Tagging of editors for re-use. diff --git a/src/plugins/vcsbase/vcsbaseeditor.h b/src/plugins/vcsbase/vcsbaseeditor.h index cbda2b9b2e2..a79df047553 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.h +++ b/src/plugins/vcsbase/vcsbaseeditor.h @@ -199,8 +199,7 @@ signals: void describeRequested(const Utils::FilePath &source, const QString &change); void annotateRevisionRequested(const Utils::FilePath &workingDirectory, const QString &file, const QString &change, int lineNumber); - void diffChunkApplied(const VcsBase::DiffChunk &dc); - void diffChunkReverted(const VcsBase::DiffChunk &dc); + void diffChunkReverted(); protected: void contextMenuEvent(QContextMenuEvent *e) override;