forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user