forked from qt-creator/qt-creator
AbstractProcessStep: Check for existence of executable
Task-number: QTCREATORBUG-11250 Change-Id: Idba517091a633f8ff57df5a6f42fe0f03a35142d Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This commit is contained in:
@@ -188,6 +188,14 @@ void AbstractProcessStep::run(QFutureInterface<bool> &fi)
|
|||||||
if (!wd.exists())
|
if (!wd.exists())
|
||||||
wd.mkpath(wd.absolutePath());
|
wd.mkpath(wd.absolutePath());
|
||||||
|
|
||||||
|
QString effectiveCommand = m_param.effectiveCommand();
|
||||||
|
if (!QFileInfo(effectiveCommand).exists()) {
|
||||||
|
processStartupFailed();
|
||||||
|
fi.reportResult(false);
|
||||||
|
emit finished();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_process = new Utils::QtcProcess();
|
m_process = new Utils::QtcProcess();
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
m_process->setUseCtrlCStub(true);
|
m_process->setUseCtrlCStub(true);
|
||||||
@@ -203,7 +211,7 @@ void AbstractProcessStep::run(QFutureInterface<bool> &fi)
|
|||||||
connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)),
|
connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)),
|
||||||
this, SLOT(slotProcessFinished(int,QProcess::ExitStatus)));
|
this, SLOT(slotProcessFinished(int,QProcess::ExitStatus)));
|
||||||
|
|
||||||
m_process->setCommand(m_param.effectiveCommand(), m_param.effectiveArguments());
|
m_process->setCommand(effectiveCommand, m_param.effectiveArguments());
|
||||||
m_process->start();
|
m_process->start();
|
||||||
if (!m_process->waitForStarted()) {
|
if (!m_process->waitForStarted()) {
|
||||||
processStartupFailed();
|
processStartupFailed();
|
||||||
|
|||||||
Reference in New Issue
Block a user