ShellCommand: Pass OutputProxy to runFullySynchronous

No need to create a fresh one.

Change-Id: I3c7b92319ab43030620428987dfa254be7ac03a7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Tobias Hunger
2016-07-05 13:23:42 +02:00
parent 53c602633c
commit c2075f6a73
2 changed files with 3 additions and 3 deletions

View File

@@ -327,7 +327,7 @@ Utils::SynchronousProcessResponse ShellCommand::runCommand(const Utils::FileName
proxy->appendCommand(dir, binary, arguments);
if (d->m_flags & FullySynchronously) {
response = runFullySynchronous(binary, arguments, timeoutS, dir, interpreter);
response = runFullySynchronous(binary, arguments, proxy.data(), timeoutS, dir, interpreter);
} else {
Utils::SynchronousProcess process;
process.setExitCodeInterpreter(interpreter);
@@ -395,14 +395,13 @@ Utils::SynchronousProcessResponse ShellCommand::runCommand(const Utils::FileName
Utils::SynchronousProcessResponse ShellCommand::runFullySynchronous(const Utils::FileName &binary,
const QStringList &arguments,
OutputProxy *proxy,
int timeoutS,
const QString &workingDirectory,
const ExitCodeInterpreter &interpreter)
{
Utils::SynchronousProcessResponse response;
QScopedPointer<OutputProxy> proxy(d->m_proxyFactory());
// Set up process
QSharedPointer<QProcess> process = Utils::SynchronousProcess::createProcess(processFlags());
if (!d->m_defaultWorkingDirectory.isEmpty())

View File

@@ -163,6 +163,7 @@ protected:
private:
void run(QFutureInterface<void> &future);
SynchronousProcessResponse runFullySynchronous(const FileName &binary, const QStringList &arguments,
OutputProxy *proxy,
int timeoutS, const QString &workingDirectory,
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);