Commit c2075f6a authored by Tobias Hunger's avatar Tobias Hunger

ShellCommand: Pass OutputProxy to runFullySynchronous

No need to create a fresh one.

Change-Id: I3c7b92319ab43030620428987dfa254be7ac03a7
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 53c60263
......@@ -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())
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment