forked from qt-creator/qt-creator
VcsBase: Hide VcsCommand class
Make it an implementation detail. Introduce VcsBaseClient::createVcsCommand() method instead for instantiating VcsCommands. Replace all occuriences of VcsBase::VcsCommand in public API with Utils::ShellCommand. Change-Id: Ie438cc3a5e867b3ee8f9e935b56b2f16ea453f8a Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -62,13 +62,14 @@
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/runextensions.h>
|
||||
#include <utils/shellcommand.h>
|
||||
#include <utils/stringutils.h>
|
||||
#include <utils/temporarydirectory.h>
|
||||
|
||||
#include <vcsbase/basevcseditorfactory.h>
|
||||
#include <vcsbase/basevcssubmiteditorfactory.h>
|
||||
#include <vcsbase/vcsbaseclient.h>
|
||||
#include <vcsbase/vcsbaseeditor.h>
|
||||
#include <vcsbase/vcscommand.h>
|
||||
#include <vcsbase/vcsoutputwindow.h>
|
||||
#include <vcsbase/vcsbasesubmiteditor.h>
|
||||
#include <vcsbase/vcsbaseplugin.h>
|
||||
@@ -1667,10 +1668,11 @@ ClearCasePluginPrivate::runCleartool(const FilePath &workingDir,
|
||||
QtcProcess proc;
|
||||
proc.setTimeoutS(timeOutS);
|
||||
|
||||
VcsCommand command(workingDir, Environment::systemEnvironment());
|
||||
command.addFlags(flags);
|
||||
command.setCodec(outputCodec);
|
||||
command.runCommand(proc, {FilePath::fromString(executable), arguments});
|
||||
auto *command = VcsBaseClient::createVcsCommand(workingDir, Environment::systemEnvironment());
|
||||
command->addFlags(flags);
|
||||
command->setCodec(outputCodec);
|
||||
command->runCommand(proc, {FilePath::fromString(executable), arguments});
|
||||
delete command;
|
||||
|
||||
response.error = proc.result() != ProcessResult::FinishedWithSuccess;
|
||||
if (response.error)
|
||||
|
||||
Reference in New Issue
Block a user