forked from qt-creator/qt-creator
Project: Fix crashes
Task-number: QTCREATORBUG-7563 Change-Id: Ib7630e9ca82a0b09703ff948af95af53ced05730 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
f930db7e0a
commit
dc251deccf
@@ -226,6 +226,8 @@ void BuildSettingsWidget::updateAddButtonMenu()
|
|||||||
this, SLOT(cloneConfiguration()));
|
this, SLOT(cloneConfiguration()));
|
||||||
}
|
}
|
||||||
IBuildConfigurationFactory * factory = IBuildConfigurationFactory::find(m_target);
|
IBuildConfigurationFactory * factory = IBuildConfigurationFactory::find(m_target);
|
||||||
|
if (!factory)
|
||||||
|
return;
|
||||||
foreach (Core::Id id, factory->availableCreationIds(m_target)) {
|
foreach (Core::Id id, factory->availableCreationIds(m_target)) {
|
||||||
QAction *action = m_addButtonMenu->addAction(factory->displayNameForId(id), this, SLOT(createConfiguration()));
|
QAction *action = m_addButtonMenu->addAction(factory->displayNameForId(id), this, SLOT(createConfiguration()));
|
||||||
action->setData(QVariant::fromValue(id));
|
action->setData(QVariant::fromValue(id));
|
||||||
|
@@ -924,17 +924,16 @@ QtSupport::ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4Pro
|
|||||||
|
|
||||||
Profile *p;
|
Profile *p;
|
||||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||||
Qt4BuildConfiguration *currentBc = bc;
|
|
||||||
QStringList qmakeArgs;
|
QStringList qmakeArgs;
|
||||||
if (!currentBc)
|
if (!bc)
|
||||||
currentBc = activeTarget() ? qobject_cast<Qt4BuildConfiguration *>(activeTarget()->activeBuildConfiguration()) : 0;
|
bc = activeTarget() ? qobject_cast<Qt4BuildConfiguration *>(activeTarget()->activeBuildConfiguration()) : 0;
|
||||||
|
|
||||||
if (currentBc) {
|
if (bc) {
|
||||||
p = currentBc->target()->profile();
|
p = bc->target()->profile();
|
||||||
env = currentBc->environment();
|
env = bc->environment();
|
||||||
if (currentBc->qmakeStep()) {
|
if (bc->qmakeStep()) {
|
||||||
qmakeArgs = currentBc->qmakeStep()->parserArguments();
|
qmakeArgs = bc->qmakeStep()->parserArguments();
|
||||||
m_proFileOption->qmakespec = currentBc->qmakeStep()->mkspec().toString();
|
m_proFileOption->qmakespec = bc->qmakeStep()->mkspec().toString();
|
||||||
} else {
|
} else {
|
||||||
qmakeArgs = bc->configCommandLineArguments();
|
qmakeArgs = bc->configCommandLineArguments();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user