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);
|
proxy->appendCommand(dir, binary, arguments);
|
||||||
|
|
||||||
if (d->m_flags & FullySynchronously) {
|
if (d->m_flags & FullySynchronously) {
|
||||||
response = runFullySynchronous(binary, arguments, timeoutS, dir, interpreter);
|
response = runFullySynchronous(binary, arguments, proxy.data(), timeoutS, dir, interpreter);
|
||||||
} else {
|
} else {
|
||||||
Utils::SynchronousProcess process;
|
Utils::SynchronousProcess process;
|
||||||
process.setExitCodeInterpreter(interpreter);
|
process.setExitCodeInterpreter(interpreter);
|
||||||
@@ -395,14 +395,13 @@ Utils::SynchronousProcessResponse ShellCommand::runCommand(const Utils::FileName
|
|||||||
|
|
||||||
Utils::SynchronousProcessResponse ShellCommand::runFullySynchronous(const Utils::FileName &binary,
|
Utils::SynchronousProcessResponse ShellCommand::runFullySynchronous(const Utils::FileName &binary,
|
||||||
const QStringList &arguments,
|
const QStringList &arguments,
|
||||||
|
OutputProxy *proxy,
|
||||||
int timeoutS,
|
int timeoutS,
|
||||||
const QString &workingDirectory,
|
const QString &workingDirectory,
|
||||||
const ExitCodeInterpreter &interpreter)
|
const ExitCodeInterpreter &interpreter)
|
||||||
{
|
{
|
||||||
Utils::SynchronousProcessResponse response;
|
Utils::SynchronousProcessResponse response;
|
||||||
|
|
||||||
QScopedPointer<OutputProxy> proxy(d->m_proxyFactory());
|
|
||||||
|
|
||||||
// Set up process
|
// Set up process
|
||||||
QSharedPointer<QProcess> process = Utils::SynchronousProcess::createProcess(processFlags());
|
QSharedPointer<QProcess> process = Utils::SynchronousProcess::createProcess(processFlags());
|
||||||
if (!d->m_defaultWorkingDirectory.isEmpty())
|
if (!d->m_defaultWorkingDirectory.isEmpty())
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
void run(QFutureInterface<void> &future);
|
void run(QFutureInterface<void> &future);
|
||||||
SynchronousProcessResponse runFullySynchronous(const FileName &binary, const QStringList &arguments,
|
SynchronousProcessResponse runFullySynchronous(const FileName &binary, const QStringList &arguments,
|
||||||
|
OutputProxy *proxy,
|
||||||
int timeoutS, const QString &workingDirectory,
|
int timeoutS, const QString &workingDirectory,
|
||||||
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
|
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user