From c2075f6a73139109a2d0f54d2999868967af892a Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 5 Jul 2016 13:23:42 +0200 Subject: [PATCH] ShellCommand: Pass OutputProxy to runFullySynchronous No need to create a fresh one. Change-Id: I3c7b92319ab43030620428987dfa254be7ac03a7 Reviewed-by: Tobias Hunger --- src/libs/utils/shellcommand.cpp | 5 ++--- src/libs/utils/shellcommand.h | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/utils/shellcommand.cpp b/src/libs/utils/shellcommand.cpp index 527be6614f8..a5681b7575f 100644 --- a/src/libs/utils/shellcommand.cpp +++ b/src/libs/utils/shellcommand.cpp @@ -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 proxy(d->m_proxyFactory()); - // Set up process QSharedPointer process = Utils::SynchronousProcess::createProcess(processFlags()); if (!d->m_defaultWorkingDirectory.isEmpty()) diff --git a/src/libs/utils/shellcommand.h b/src/libs/utils/shellcommand.h index 512b37c55a3..71667edf8c3 100644 --- a/src/libs/utils/shellcommand.h +++ b/src/libs/utils/shellcommand.h @@ -163,6 +163,7 @@ protected: private: void run(QFutureInterface &future); SynchronousProcessResponse runFullySynchronous(const FileName &binary, const QStringList &arguments, + OutputProxy *proxy, int timeoutS, const QString &workingDirectory, const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);