forked from qt-creator/qt-creator
GenericProjectManager: Fix crash for make deploy steps
Task-number: QTCREATORBUG-7183 Change-Id: Ib917c8990c698b7315ebb79083bf71623b3ae6e7 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -110,6 +110,8 @@ GenericBuildConfiguration *GenericMakeStep::genericBuildConfiguration() const
|
|||||||
bool GenericMakeStep::init()
|
bool GenericMakeStep::init()
|
||||||
{
|
{
|
||||||
GenericBuildConfiguration *bc = genericBuildConfiguration();
|
GenericBuildConfiguration *bc = genericBuildConfiguration();
|
||||||
|
if (!bc)
|
||||||
|
bc = static_cast<GenericBuildConfiguration *>(target()->activeBuildConfiguration());
|
||||||
|
|
||||||
ProjectExplorer::ProcessParameters *pp = processParameters();
|
ProjectExplorer::ProcessParameters *pp = processParameters();
|
||||||
pp->setMacroExpander(bc->macroExpander());
|
pp->setMacroExpander(bc->macroExpander());
|
||||||
@@ -173,7 +175,7 @@ QString GenericMakeStep::makeCommand() const
|
|||||||
{
|
{
|
||||||
QString command = m_makeCommand;
|
QString command = m_makeCommand;
|
||||||
if (command.isEmpty()) {
|
if (command.isEmpty()) {
|
||||||
GenericProject *pro = genericBuildConfiguration()->genericTarget()->genericProject();
|
GenericProject *pro = static_cast<GenericProject *>(target()->project());
|
||||||
if (ProjectExplorer::ToolChain *toolChain = pro->toolChain())
|
if (ProjectExplorer::ToolChain *toolChain = pro->toolChain())
|
||||||
command = toolChain->makeCommand();
|
command = toolChain->makeCommand();
|
||||||
else
|
else
|
||||||
@@ -224,7 +226,7 @@ GenericMakeStepConfigWidget::GenericMakeStepConfigWidget(GenericMakeStep *makeSt
|
|||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
// TODO update this list also on rescans of the GenericLists.txt
|
// TODO update this list also on rescans of the GenericLists.txt
|
||||||
GenericProject *pro = m_makeStep->genericBuildConfiguration()->genericTarget()->genericProject();
|
GenericProject *pro = static_cast<GenericProject *>(m_makeStep->target()->project());
|
||||||
foreach (const QString &target, pro->buildTargets()) {
|
foreach (const QString &target, pro->buildTargets()) {
|
||||||
QListWidgetItem *item = new QListWidgetItem(target, m_ui->targetsList);
|
QListWidgetItem *item = new QListWidgetItem(target, m_ui->targetsList);
|
||||||
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
|
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
|
||||||
@@ -263,6 +265,8 @@ void GenericMakeStepConfigWidget::updateMakeOverrrideLabel()
|
|||||||
void GenericMakeStepConfigWidget::updateDetails()
|
void GenericMakeStepConfigWidget::updateDetails()
|
||||||
{
|
{
|
||||||
GenericBuildConfiguration *bc = m_makeStep->genericBuildConfiguration();
|
GenericBuildConfiguration *bc = m_makeStep->genericBuildConfiguration();
|
||||||
|
if (!bc)
|
||||||
|
bc = static_cast<GenericBuildConfiguration *>(m_makeStep->target()->activeBuildConfiguration());
|
||||||
|
|
||||||
ProjectExplorer::ProcessParameters param;
|
ProjectExplorer::ProcessParameters param;
|
||||||
param.setMacroExpander(bc->macroExpander());
|
param.setMacroExpander(bc->macroExpander());
|
||||||
|
Reference in New Issue
Block a user