diff options
author | Tobias Hunger <[email protected]> | 2015-06-08 15:04:04 +0200 |
---|---|---|
committer | Tobias Hunger <[email protected]> | 2015-06-10 13:04:42 +0000 |
commit | f2be7976963a443abd1dae47123b47dec48cf97a (patch) | |
tree | bac8170a592065154de0799bd3533a48bf4e7194 /src/plugins/vcsbase/vcsbaseclient.cpp | |
parent | ccbc7f9ec1ce205b6a0574200bc8d71c912a9881 (diff) |
ShellCommand: Allow setting working directory per job
Change-Id: I6d541f87b76bdc7f1503f202792079f833e8932c
Reviewed-by: Orgad Shaneh <[email protected]>
Diffstat (limited to 'src/plugins/vcsbase/vcsbaseclient.cpp')
-rw-r--r-- | src/plugins/vcsbase/vcsbaseclient.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp index 327d1dfa6ef..36df6fb2f00 100644 --- a/src/plugins/vcsbase/vcsbaseclient.cpp +++ b/src/plugins/vcsbase/vcsbaseclient.cpp @@ -155,9 +155,10 @@ VcsCommand *VcsBaseClientImpl::createCommand(const QString &workingDirectory, } void VcsBaseClientImpl::enqueueJob(VcsCommand *cmd, const QStringList &args, + const QString &workingDirectory, Utils::ExitCodeInterpreter *interpreter) { - cmd->addJob(vcsBinary(), args, vcsTimeoutS(), interpreter); + cmd->addJob(vcsBinary(), args, vcsTimeoutS(), workingDirectory, interpreter); cmd->execute(); } @@ -470,7 +471,7 @@ void VcsBaseClient::diff(const QString &workingDir, const QStringList &files, QTextCodec *codec = source.isEmpty() ? static_cast<QTextCodec *>(0) : VcsBaseEditor::getCodec(source); VcsCommand *command = createCommand(workingDir, editor); command->setCodec(codec); - enqueueJob(command, args, exitCodeInterpreter(DiffCommand, command)); + enqueueJob(command, args, workingDir, exitCodeInterpreter(DiffCommand, command)); } void VcsBaseClient::log(const QString &workingDir, const QStringList &files, |