From c7c785ace312eb4b857872e12b93ee72be17f89b Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 15 Apr 2015 16:09:56 +0200 Subject: 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 --- src/plugins/vcsbase/vcsbaseclient.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/vcsbase/vcsbaseclient.cpp') diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp index 5b262ee4c70..8d31beedd68 100644 --- a/src/plugins/vcsbase/vcsbaseclient.cpp +++ b/src/plugins/vcsbase/vcsbaseclient.cpp @@ -139,7 +139,7 @@ VcsCommand *VcsBaseClientImpl::createCommand(const QString &workingDirectory, VcsBaseEditorWidget *editor, JobOutputBindMode mode) const { - auto cmd = new VcsCommand(vcsBinary(), workingDirectory, processEnvironment()); + auto cmd = new VcsCommand(workingDirectory, processEnvironment()); cmd->setDefaultTimeoutS(vcsTimeoutS()); if (editor) d->bindCommandToEditor(cmd, editor); @@ -157,7 +157,7 @@ VcsCommand *VcsBaseClientImpl::createCommand(const QString &workingDirectory, void VcsBaseClientImpl::enqueueJob(VcsCommand *cmd, const QStringList &args, Utils::ExitCodeInterpreter *interpreter) { - cmd->addJob(args, vcsTimeoutS(), interpreter); + cmd->addJob(vcsBinary(), args, vcsTimeoutS(), interpreter); cmd->execute(); } @@ -209,7 +209,7 @@ bool VcsBaseClientImpl::vcsFullySynchronousExec(const QString &workingDir, const QByteArray internalErrorData; QScopedPointer command(createCommand(workingDir)); command->addFlags(flags); - bool result = command->runFullySynchronous(args, vcsTimeoutS(), outputData, + bool result = command->runFullySynchronous(vcsBinary(), args, vcsTimeoutS(), outputData, errorData ? errorData : &internalErrorData); if (!internalErrorData.isEmpty() && !(flags & VcsBasePlugin::SuppressStdErrInLogWindow)) VcsOutputWindow::appendError(commandOutputFromLocal8Bit(internalErrorData)); -- cgit v1.2.3