Commit bcbf17a3 authored by Daniel Teske's avatar Daniel Teske
Browse files

Fix crash on adding MakeStep



This time for real.

Task-number: QTCREATORBUG-6688
Change-Id: I5256e8ca2b50830d8b8b2dd0202031c27bdc6923
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 6939ed0c
......@@ -238,12 +238,14 @@ bool MakeStep::init()
setOutputParser(parser);
m_scriptTarget = (bc->qt4Target()->qt4Project()->rootQt4ProjectNode()->projectType() == ScriptTemplate);
return AbstractProcessStep::init();
}
void MakeStep::run(QFutureInterface<bool> & fi)
{
if (qt4BuildConfiguration()->qt4Target()->qt4Project()->rootQt4ProjectNode()->projectType() == ScriptTemplate) {
if (m_scriptTarget) {
fi.reportResult(true);
return;
}
......@@ -351,13 +353,22 @@ void MakeStepConfigWidget::qtVersionChanged()
void MakeStepConfigWidget::updateMakeOverrideLabel()
{
Qt4BuildConfiguration *qt4bc = m_makeStep->qt4BuildConfiguration();
m_ui->makeLabel->setText(tr("Override %1:").arg(qt4bc->makeCommand()));
Qt4BuildConfiguration *bc = m_makeStep->qt4BuildConfiguration();
if (!bc)
bc = qobject_cast<Qt4BuildConfiguration *>(m_makeStep->target()->activeBuildConfiguration());
if (bc)
m_ui->makeLabel->setText(tr("Override %1:").arg(bc->makeCommand()));
else
m_ui->makeLabel->setText(tr("Make:"));
}
void MakeStepConfigWidget::updateDetails()
{
Qt4BuildConfiguration *bc = m_makeStep->qt4BuildConfiguration();
if (!bc)
bc = qobject_cast<Qt4BuildConfiguration *>(m_makeStep->target()->activeBuildConfiguration());
if (!bc)
m_summaryText = tr("No qt4 buildconfiguration."); // Can't happen
ProjectExplorer::ProcessParameters param;
param.setMacroExpander(bc->macroExpander());
......
......@@ -113,6 +113,7 @@ protected:
private:
void ctor();
bool m_clean;
bool m_scriptTarget;
QString m_makeFileToCheck;
QString m_userArgs;
QString m_makeCmd;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment