forked from qt-creator/qt-creator
Fix crash on adding MakeSteps to a DeployConfiguration
Task-number: QTCREATORBUG-6688 Change-Id: I6d1e44ee0e1e67a5fc4289f508a7c285e4e6c13a Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -130,8 +130,18 @@ bool MakeStep::fromMap(const QVariantMap &map)
|
|||||||
bool MakeStep::init()
|
bool MakeStep::init()
|
||||||
{
|
{
|
||||||
Qt4BuildConfiguration *bc = qt4BuildConfiguration();
|
Qt4BuildConfiguration *bc = qt4BuildConfiguration();
|
||||||
|
if (!bc)
|
||||||
|
bc = qobject_cast<Qt4BuildConfiguration *>(target()->activeBuildConfiguration());
|
||||||
|
|
||||||
m_tasks.clear();
|
m_tasks.clear();
|
||||||
|
if (!bc) {
|
||||||
|
m_tasks.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
|
||||||
|
tr("Qt Creator needs a buildconfiguration set up to build. Configure a tool chain in Project mode."),
|
||||||
|
QString(), -1,
|
||||||
|
QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!bc->toolChain()) {
|
if (!bc->toolChain()) {
|
||||||
m_tasks.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
|
m_tasks.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
|
||||||
tr("Qt Creator needs a tool chain set up to build. Configure a tool chain in Project mode."),
|
tr("Qt Creator needs a tool chain set up to build. Configure a tool chain in Project mode."),
|
||||||
|
Reference in New Issue
Block a user