Commit 396c0337 authored by Tobias Hunger's avatar Tobias Hunger

Project: Fix possible crash with projects without build configuration

Do not allow to rename buildconfigurations if there are none.

Change-Id: I3da2ea9568c2dabf555685c3b27192bea8dcc009
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent 2186d081
......@@ -199,7 +199,9 @@ void BuildSettingsWidget::updateBuildSettings()
clearWidgets();
// update buttons
m_removeButton->setEnabled(m_target->buildConfigurations().size() > 1);
QList<BuildConfiguration *> bcs = m_target->buildConfigurations();
m_removeButton->setEnabled(bcs.size() > 1);
m_renameButton->setEnabled(!bcs.isEmpty());
if (!m_buildConfiguration)
return;
......@@ -288,6 +290,7 @@ QString BuildSettingsWidget::uniqueName(const QString & name)
void BuildSettingsWidget::renameConfiguration()
{
QTC_ASSERT(m_buildConfiguration, return);
bool ok;
QString name = QInputDialog::getText(this, tr("Rename..."),
tr("New name for build configuration <b>%1</b>:").
......
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