forked from qt-creator/qt-creator
Move patch command out of VcsPlugin
It will be needed soon inside DiffEditor plugin. Move "Patch command" setting out of Version Control | General into Environment | General | System. Introduce PatchTool class, which hold the patch command setting and a method for applying patches (runPatch() - moved from VcsBasePlugin). Change-Id: I9de94358ccd5c6e31ac2beefc27305c5111d67bb Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
#include <coreplugin/patchtool.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <projectexplorer/editorconfiguration.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
@@ -1449,7 +1450,7 @@ bool VcsBaseEditorWidget::canApplyDiffChunk(const DiffChunk &dc) const
|
||||
// (passing '-R' for revert), assuming we got absolute paths from the VCS plugins.
|
||||
bool VcsBaseEditorWidget::applyDiffChunk(const DiffChunk &dc, bool revert) const
|
||||
{
|
||||
return VcsBasePlugin::runPatch(dc.asPatch(d->m_workingDirectory),
|
||||
return Core::PatchTool::runPatch(dc.asPatch(d->m_workingDirectory),
|
||||
d->m_workingDirectory, 0, revert);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user