ShellCommand: Fix crash with OutputProxy use

Pass a shared pointer into runSynchronous and runFullySynchronous.
That way the proxy will stay around for as long as needed.

Task-number: QTCREATORBUG-16612
Change-Id: Ic529440c81d85149abd67e5eeb564cc5f12181ab
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2016-07-18 12:00:17 +02:00
parent 6f3bf106b5
commit ad2b968e4c
2 changed files with 6 additions and 6 deletions

View File

@@ -168,12 +168,12 @@ private:
// Run without a event loop in fully blocking mode. No signals will be delivered.
SynchronousProcessResponse runFullySynchronous(const FileName &binary, const QStringList &arguments,
OutputProxy *proxy,
QSharedPointer<OutputProxy> proxy,
int timeoutS, const QString &workingDirectory,
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);
// Run with an event loop. Signals will be delivered.
SynchronousProcessResponse runSynchronous(const FileName &binary, const QStringList &arguments,
OutputProxy *proxy,
QSharedPointer<OutputProxy> proxy,
int timeoutS, const QString &workingDirectory,
const ExitCodeInterpreter &interpreter = defaultExitCodeInterpreter);