Vcs: Push the binary into the Jobs of VcsCommand

This is the first step to generalizing the class for wider use.

Change-Id: I40ccb5bec4fdcb9d0a67388160c867799331007b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Tobias Hunger
2015-04-15 16:09:56 +02:00
parent 6a9bd957cb
commit c7c785ace3
11 changed files with 66 additions and 85 deletions

View File

@@ -90,7 +90,7 @@ VcsCommand *SubversionClient::createCommitCmd(const QString &repositoryRoot,
VcsCommand *cmd = createCommand(repositoryRoot);
cmd->addFlags(VcsBasePlugin::ShowStdOutInLogWindow);
QStringList args(vcsCommandString(CommitCommand));
cmd->addJob(args << svnExtraOptions << files);
cmd->addJob(vcsBinary(), args << svnExtraOptions << files);
return cmd;
}
@@ -232,7 +232,7 @@ QString DiffController::getDescription() const
void DiffController::postCollectTextualDiffOutput()
{
auto command = new VcsCommand(m_client->vcsBinary(), m_workingDirectory, processEnvironment());
auto command = new VcsCommand(m_workingDirectory, processEnvironment());
command->setCodec(EditorManager::defaultTextCodec());
connect(command, SIGNAL(output(QString)),
this, SLOT(slotTextualDiffOutputReceived(QString)));
@@ -251,7 +251,7 @@ void DiffController::postCollectTextualDiffOutput()
args << m_filesList;
}
command->addJob(args, m_client->vcsTimeoutS());
command->addJob(m_client->vcsBinary(), args, m_client->vcsTimeoutS());
command->execute();
}