forked from qt-creator/qt-creator
Fix crash of process steps in deploy configuration
If the step is in a deploy configuration, it doesn't have a direct
parent build configuration, so we need to get that from the active
target.
This is generally improved for BuildStep in master, but here we still
have to do that by hand.
Fix-up of 75afda1798
Task-number: QTCREATORBUG-20631
Change-Id: I22fa16d424ee5928c920663e9d01c791b964e873
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
#include "buildconfiguration.h"
|
#include "buildconfiguration.h"
|
||||||
#include "buildstep.h"
|
#include "buildstep.h"
|
||||||
#include "project.h"
|
#include "project.h"
|
||||||
|
#include "target.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
|
|
||||||
#include <coreplugin/reaper.h>
|
#include <coreplugin/reaper.h>
|
||||||
@@ -306,7 +307,10 @@ void AbstractProcessStep::processReadyReadStdOutput()
|
|||||||
if (!m_process)
|
if (!m_process)
|
||||||
return;
|
return;
|
||||||
m_process->setReadChannel(QProcess::StandardOutput);
|
m_process->setReadChannel(QProcess::StandardOutput);
|
||||||
const bool utf8Output = buildConfiguration()->environment().hasKey("VSLANG");
|
BuildConfiguration *bc = buildConfiguration();
|
||||||
|
if (!bc)
|
||||||
|
bc = target()->activeBuildConfiguration();
|
||||||
|
const bool utf8Output = bc && bc->environment().hasKey("VSLANG");
|
||||||
|
|
||||||
while (m_process->canReadLine()) {
|
while (m_process->canReadLine()) {
|
||||||
QString line = utf8Output ? QString::fromUtf8(m_process->readLine())
|
QString line = utf8Output ? QString::fromUtf8(m_process->readLine())
|
||||||
|
|||||||
Reference in New Issue
Block a user