2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2008-12-02 16:19:05 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#include "buildsettingspropertiespage.h"
|
2013-07-22 15:53:57 +02:00
|
|
|
#include "buildinfo.h"
|
2008-12-02 12:01:29 +01:00
|
|
|
#include "buildstepspage.h"
|
2010-02-08 15:50:06 +01:00
|
|
|
#include "target.h"
|
2021-07-28 20:49:55 +03:00
|
|
|
#include "project.h"
|
2009-09-21 17:54:02 +02:00
|
|
|
#include "buildconfiguration.h"
|
2016-05-02 17:12:12 +02:00
|
|
|
#include "projectconfigurationmodel.h"
|
2015-07-28 18:29:52 +02:00
|
|
|
#include "session.h"
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2020-11-10 16:55:09 +01:00
|
|
|
#include <utils/algorithm.h>
|
2009-10-29 15:17:21 +01:00
|
|
|
#include <utils/qtcassert.h>
|
2020-11-10 16:55:09 +01:00
|
|
|
#include <utils/stringutils.h>
|
2013-07-22 15:53:57 +02:00
|
|
|
#include <coreplugin/icore.h>
|
2011-10-24 13:10:38 +00:00
|
|
|
#include <projectexplorer/projectexplorer.h>
|
|
|
|
|
#include <projectexplorer/buildmanager.h>
|
2018-03-28 16:03:11 +02:00
|
|
|
#include <utils/stringutils.h>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QMargins>
|
|
|
|
|
#include <QCoreApplication>
|
|
|
|
|
#include <QComboBox>
|
|
|
|
|
#include <QInputDialog>
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
#include <QMenu>
|
|
|
|
|
#include <QMessageBox>
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
#include <QVBoxLayout>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
using namespace ProjectExplorer;
|
|
|
|
|
using namespace ProjectExplorer::Internal;
|
2020-11-10 16:55:09 +01:00
|
|
|
using namespace Utils;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2009-07-16 15:33:19 +02:00
|
|
|
///
|
2009-11-30 16:44:22 +01:00
|
|
|
// BuildSettingsWidget
|
2009-07-16 15:33:19 +02:00
|
|
|
///
|
|
|
|
|
|
2009-11-30 16:44:22 +01:00
|
|
|
BuildSettingsWidget::~BuildSettingsWidget()
|
2009-07-16 15:33:19 +02:00
|
|
|
{
|
2013-08-13 10:52:57 +02:00
|
|
|
clearWidgets();
|
2009-07-16 15:33:19 +02:00
|
|
|
}
|
|
|
|
|
|
2010-02-08 15:50:06 +01:00
|
|
|
BuildSettingsWidget::BuildSettingsWidget(Target *target) :
|
2016-04-13 15:52:14 +02:00
|
|
|
m_target(target)
|
2009-07-16 15:33:19 +02:00
|
|
|
{
|
2010-02-08 15:50:06 +01:00
|
|
|
Q_ASSERT(m_target);
|
2009-07-16 15:33:19 +02:00
|
|
|
|
2016-04-13 15:52:14 +02:00
|
|
|
auto vbox = new QVBoxLayout(this);
|
2009-11-30 16:44:22 +01:00
|
|
|
vbox->setContentsMargins(0, 0, 0, 0);
|
2009-10-29 15:17:21 +01:00
|
|
|
|
2019-01-29 08:55:52 +01:00
|
|
|
if (!BuildConfigurationFactory::find(m_target)) {
|
2016-04-13 15:52:14 +02:00
|
|
|
auto noSettingsLabel = new QLabel(this);
|
2010-05-14 15:45:43 +02:00
|
|
|
noSettingsLabel->setText(tr("No build settings available"));
|
2011-09-28 15:47:34 +02:00
|
|
|
QFont f = noSettingsLabel->font();
|
|
|
|
|
f.setPointSizeF(f.pointSizeF() * 1.2);
|
|
|
|
|
noSettingsLabel->setFont(f);
|
2010-02-08 15:50:06 +01:00
|
|
|
vbox->addWidget(noSettingsLabel);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2009-10-29 15:17:21 +01:00
|
|
|
{ // Edit Build Configuration row
|
2016-04-13 15:52:14 +02:00
|
|
|
auto hbox = new QHBoxLayout();
|
2010-05-21 14:29:11 +02:00
|
|
|
hbox->setContentsMargins(0, 0, 0, 0);
|
2010-05-14 15:45:43 +02:00
|
|
|
hbox->addWidget(new QLabel(tr("Edit build configuration:"), this));
|
2009-10-29 15:17:21 +01:00
|
|
|
m_buildConfigurationComboBox = new QComboBox(this);
|
|
|
|
|
m_buildConfigurationComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
2019-07-30 09:15:56 +02:00
|
|
|
m_buildConfigurationComboBox->setModel(m_target->buildConfigurationModel());
|
2009-10-29 15:17:21 +01:00
|
|
|
hbox->addWidget(m_buildConfigurationComboBox);
|
|
|
|
|
|
|
|
|
|
m_addButton = new QPushButton(this);
|
|
|
|
|
m_addButton->setText(tr("Add"));
|
|
|
|
|
m_addButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
|
|
|
|
hbox->addWidget(m_addButton);
|
2009-11-30 16:44:22 +01:00
|
|
|
m_addButtonMenu = new QMenu(this);
|
|
|
|
|
m_addButton->setMenu(m_addButtonMenu);
|
2009-10-29 15:17:21 +01:00
|
|
|
|
|
|
|
|
m_removeButton = new QPushButton(this);
|
|
|
|
|
m_removeButton->setText(tr("Remove"));
|
|
|
|
|
m_removeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
|
|
|
|
hbox->addWidget(m_removeButton);
|
2010-02-12 15:15:57 +01:00
|
|
|
|
2010-08-18 15:37:26 +02:00
|
|
|
m_renameButton = new QPushButton(this);
|
2011-11-02 12:42:48 +01:00
|
|
|
m_renameButton->setText(tr("Rename..."));
|
2010-08-18 15:37:26 +02:00
|
|
|
m_renameButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
|
|
|
|
hbox->addWidget(m_renameButton);
|
|
|
|
|
|
2019-01-17 16:37:16 +01:00
|
|
|
m_cloneButton = new QPushButton(this);
|
|
|
|
|
m_cloneButton->setText(tr("Clone..."));
|
|
|
|
|
m_cloneButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
|
|
|
|
hbox->addWidget(m_cloneButton);
|
|
|
|
|
|
2009-10-29 15:17:21 +01:00
|
|
|
hbox->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed));
|
|
|
|
|
vbox->addLayout(hbox);
|
|
|
|
|
}
|
|
|
|
|
|
2010-02-08 15:50:06 +01:00
|
|
|
m_buildConfiguration = m_target->activeBuildConfiguration();
|
2019-07-30 09:15:56 +02:00
|
|
|
m_buildConfigurationComboBox->setCurrentIndex(
|
|
|
|
|
m_target->buildConfigurationModel()->indexFor(m_buildConfiguration));
|
2009-09-17 13:59:10 +02:00
|
|
|
|
2010-03-12 14:58:51 +01:00
|
|
|
updateAddButtonMenu();
|
|
|
|
|
updateBuildSettings();
|
|
|
|
|
|
2022-07-19 22:42:48 +02:00
|
|
|
connect(m_buildConfigurationComboBox, &QComboBox::currentIndexChanged,
|
2016-01-29 16:38:37 +02:00
|
|
|
this, &BuildSettingsWidget::currentIndexChanged);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2016-01-29 16:38:37 +02:00
|
|
|
connect(m_removeButton, &QAbstractButton::clicked,
|
2022-07-19 22:42:48 +02:00
|
|
|
this, [this] { deleteConfiguration(m_buildConfiguration); });
|
2009-09-17 13:59:10 +02:00
|
|
|
|
2016-01-29 16:38:37 +02:00
|
|
|
connect(m_renameButton, &QAbstractButton::clicked,
|
|
|
|
|
this, &BuildSettingsWidget::renameConfiguration);
|
2010-08-18 15:37:26 +02:00
|
|
|
|
2019-01-17 16:37:16 +01:00
|
|
|
connect(m_cloneButton, &QAbstractButton::clicked,
|
|
|
|
|
this, &BuildSettingsWidget::cloneConfiguration);
|
|
|
|
|
|
2016-01-29 16:38:37 +02:00
|
|
|
connect(m_target, &Target::activeBuildConfigurationChanged,
|
|
|
|
|
this, &BuildSettingsWidget::updateActiveConfiguration);
|
2010-02-08 15:50:06 +01:00
|
|
|
|
2016-01-29 16:38:37 +02:00
|
|
|
connect(m_target, &Target::kitChanged, this, &BuildSettingsWidget::updateAddButtonMenu);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2012-11-08 18:02:50 +01:00
|
|
|
void BuildSettingsWidget::addSubWidget(NamedWidget *widget)
|
2009-11-30 16:44:22 +01:00
|
|
|
{
|
2019-10-25 09:55:32 +02:00
|
|
|
widget->setParent(this);
|
2010-05-21 14:29:11 +02:00
|
|
|
widget->setContentsMargins(0, 10, 0, 0);
|
2009-11-30 16:44:22 +01:00
|
|
|
|
2016-04-13 15:52:14 +02:00
|
|
|
auto label = new QLabel(this);
|
2010-07-16 14:00:41 +02:00
|
|
|
label->setText(widget->displayName());
|
2009-11-30 16:44:22 +01:00
|
|
|
QFont f = label->font();
|
|
|
|
|
f.setBold(true);
|
|
|
|
|
f.setPointSizeF(f.pointSizeF() * 1.2);
|
|
|
|
|
label->setFont(f);
|
|
|
|
|
|
2010-05-21 14:29:11 +02:00
|
|
|
label->setContentsMargins(0, 10, 0, 0);
|
2009-11-30 16:44:22 +01:00
|
|
|
|
|
|
|
|
layout()->addWidget(label);
|
|
|
|
|
layout()->addWidget(widget);
|
|
|
|
|
|
|
|
|
|
m_labels.append(label);
|
|
|
|
|
m_subWidgets.append(widget);
|
|
|
|
|
}
|
|
|
|
|
|
2013-08-13 10:52:57 +02:00
|
|
|
void BuildSettingsWidget::clearWidgets()
|
2009-11-30 16:44:22 +01:00
|
|
|
{
|
|
|
|
|
qDeleteAll(m_subWidgets);
|
|
|
|
|
m_subWidgets.clear();
|
|
|
|
|
qDeleteAll(m_labels);
|
|
|
|
|
m_labels.clear();
|
|
|
|
|
}
|
|
|
|
|
|
2009-09-28 17:30:11 +02:00
|
|
|
void BuildSettingsWidget::updateAddButtonMenu()
|
2009-09-28 15:02:12 +02:00
|
|
|
{
|
2009-09-28 17:30:11 +02:00
|
|
|
m_addButtonMenu->clear();
|
2013-07-22 15:53:57 +02:00
|
|
|
|
2010-06-11 13:41:07 +10:00
|
|
|
if (m_target) {
|
2019-01-29 08:55:52 +01:00
|
|
|
BuildConfigurationFactory *factory = BuildConfigurationFactory::find(m_target);
|
2012-06-24 20:30:02 +03:00
|
|
|
if (!factory)
|
|
|
|
|
return;
|
2019-01-29 16:51:17 +01:00
|
|
|
for (const BuildInfo &info : factory->allAvailableBuilds(m_target)) {
|
|
|
|
|
QAction *action = m_addButtonMenu->addAction(info.typeName);
|
2015-03-03 23:43:37 +01:00
|
|
|
connect(action, &QAction::triggered, this, [this, info] {
|
|
|
|
|
createConfiguration(info);
|
|
|
|
|
});
|
2009-09-28 15:02:12 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
void BuildSettingsWidget::updateBuildSettings()
|
|
|
|
|
{
|
2013-08-13 10:52:57 +02:00
|
|
|
clearWidgets();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2009-07-16 15:33:19 +02:00
|
|
|
// update buttons
|
2015-09-02 17:11:30 +02:00
|
|
|
QList<BuildConfiguration *> bcs = m_target->buildConfigurations();
|
|
|
|
|
m_removeButton->setEnabled(bcs.size() > 1);
|
|
|
|
|
m_renameButton->setEnabled(!bcs.isEmpty());
|
2019-01-17 16:37:16 +01:00
|
|
|
m_cloneButton->setEnabled(!bcs.isEmpty());
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2019-10-25 09:55:32 +02:00
|
|
|
if (m_buildConfiguration)
|
|
|
|
|
m_buildConfiguration->addConfigWidgets([this](NamedWidget *w) { addSubWidget(w); });
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2009-07-16 15:33:19 +02:00
|
|
|
void BuildSettingsWidget::currentIndexChanged(int index)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2019-07-30 09:15:56 +02:00
|
|
|
auto buildConfiguration = qobject_cast<BuildConfiguration *>(
|
|
|
|
|
m_target->buildConfigurationModel()->projectConfigurationAt(index));
|
2015-07-28 18:29:52 +02:00
|
|
|
SessionManager::setActiveBuildConfiguration(m_target, buildConfiguration, SetActive::Cascade);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2010-03-12 14:58:51 +01:00
|
|
|
void BuildSettingsWidget::updateActiveConfiguration()
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2010-03-12 14:58:51 +01:00
|
|
|
if (!m_buildConfiguration || m_buildConfiguration == m_target->activeBuildConfiguration())
|
2010-02-08 15:50:06 +01:00
|
|
|
return;
|
|
|
|
|
|
2010-03-12 14:58:51 +01:00
|
|
|
m_buildConfiguration = m_target->activeBuildConfiguration();
|
|
|
|
|
|
2019-07-30 09:15:56 +02:00
|
|
|
m_buildConfigurationComboBox->setCurrentIndex(
|
|
|
|
|
m_target->buildConfigurationModel()->indexFor(m_buildConfiguration));
|
2010-02-08 15:50:06 +01:00
|
|
|
|
2012-11-08 16:58:49 +01:00
|
|
|
updateBuildSettings();
|
2009-10-29 15:17:21 +01:00
|
|
|
}
|
|
|
|
|
|
2019-01-29 16:51:17 +01:00
|
|
|
void BuildSettingsWidget::createConfiguration(const BuildInfo &info_)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2019-01-29 16:51:17 +01:00
|
|
|
BuildInfo info = info_;
|
|
|
|
|
if (info.displayName.isEmpty()) {
|
2013-07-22 15:53:57 +02:00
|
|
|
bool ok = false;
|
2020-06-02 09:10:40 +02:00
|
|
|
info.displayName = QInputDialog::getText(Core::ICore::dialogParent(),
|
|
|
|
|
tr("New Configuration"),
|
|
|
|
|
tr("New configuration name:"),
|
|
|
|
|
QLineEdit::Normal,
|
|
|
|
|
QString(),
|
|
|
|
|
&ok)
|
|
|
|
|
.trimmed();
|
2019-01-29 16:51:17 +01:00
|
|
|
if (!ok || info.displayName.isEmpty())
|
2013-07-22 15:53:57 +02:00
|
|
|
return;
|
|
|
|
|
}
|
2012-04-24 15:49:09 +02:00
|
|
|
|
2020-01-09 18:42:28 +01:00
|
|
|
BuildConfiguration *bc = info.factory->create(m_target, info);
|
2012-04-24 15:49:09 +02:00
|
|
|
if (!bc)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
m_target->addBuildConfiguration(bc);
|
2015-07-28 18:29:52 +02:00
|
|
|
SessionManager::setActiveBuildConfiguration(m_target, bc, SetActive::Cascade);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2010-10-04 17:50:55 +02:00
|
|
|
QString BuildSettingsWidget::uniqueName(const QString & name)
|
|
|
|
|
{
|
|
|
|
|
QString result = name.trimmed();
|
|
|
|
|
if (!result.isEmpty()) {
|
|
|
|
|
QStringList bcNames;
|
2020-02-28 16:58:37 +01:00
|
|
|
for (BuildConfiguration *bc : m_target->buildConfigurations()) {
|
2010-10-04 17:50:55 +02:00
|
|
|
if (bc == m_buildConfiguration)
|
|
|
|
|
continue;
|
|
|
|
|
bcNames.append(bc->displayName());
|
|
|
|
|
}
|
2020-11-10 16:55:09 +01:00
|
|
|
result = makeUniquelyNumbered(result, bcNames);
|
2010-10-04 17:50:55 +02:00
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2010-08-18 15:37:26 +02:00
|
|
|
void BuildSettingsWidget::renameConfiguration()
|
|
|
|
|
{
|
2015-09-02 17:11:30 +02:00
|
|
|
QTC_ASSERT(m_buildConfiguration, return);
|
2010-08-18 15:37:26 +02:00
|
|
|
bool ok;
|
|
|
|
|
QString name = QInputDialog::getText(this, tr("Rename..."),
|
|
|
|
|
tr("New name for build configuration <b>%1</b>:").
|
|
|
|
|
arg(m_buildConfiguration->displayName()),
|
|
|
|
|
QLineEdit::Normal,
|
|
|
|
|
m_buildConfiguration->displayName(), &ok);
|
2011-09-28 16:38:57 +02:00
|
|
|
if (!ok)
|
2010-08-18 15:37:26 +02:00
|
|
|
return;
|
|
|
|
|
|
2010-10-04 17:50:55 +02:00
|
|
|
name = uniqueName(name);
|
|
|
|
|
if (name.isEmpty())
|
|
|
|
|
return;
|
|
|
|
|
|
2010-08-18 15:37:26 +02:00
|
|
|
m_buildConfiguration->setDisplayName(name);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-17 16:37:16 +01:00
|
|
|
void BuildSettingsWidget::cloneConfiguration()
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2019-01-17 16:37:16 +01:00
|
|
|
QTC_ASSERT(m_buildConfiguration, return);
|
2019-01-29 08:55:52 +01:00
|
|
|
BuildConfigurationFactory *factory = BuildConfigurationFactory::find(m_target);
|
2012-04-24 15:49:09 +02:00
|
|
|
if (!factory)
|
2008-12-02 12:01:29 +01:00
|
|
|
return;
|
|
|
|
|
|
2010-08-19 12:26:21 +02:00
|
|
|
//: Title of a the cloned BuildConfiguration window, text of the window
|
2017-03-09 16:58:46 +01:00
|
|
|
QString name = uniqueName(QInputDialog::getText(this,
|
|
|
|
|
tr("Clone Configuration"),
|
|
|
|
|
tr("New configuration name:"),
|
|
|
|
|
QLineEdit::Normal,
|
|
|
|
|
m_buildConfiguration->displayName()));
|
2010-10-04 17:50:55 +02:00
|
|
|
if (name.isEmpty())
|
2008-12-02 12:01:29 +01:00
|
|
|
return;
|
|
|
|
|
|
2020-11-18 22:42:51 +01:00
|
|
|
BuildConfiguration *bc = BuildConfigurationFactory::clone(m_target, m_buildConfiguration);
|
2010-02-08 15:50:06 +01:00
|
|
|
if (!bc)
|
2010-01-18 12:11:04 +01:00
|
|
|
return;
|
2010-02-08 15:50:06 +01:00
|
|
|
|
2010-10-04 17:50:55 +02:00
|
|
|
bc->setDisplayName(name);
|
2021-07-28 20:49:55 +03:00
|
|
|
const FilePath buildDirectory = bc->buildDirectory();
|
|
|
|
|
if (buildDirectory != m_target->project()->projectDirectory()) {
|
|
|
|
|
const std::function<bool(const FilePath &)> isBuildDirOk = [this](const FilePath &candidate) {
|
|
|
|
|
if (candidate.exists())
|
|
|
|
|
return false;
|
|
|
|
|
return !anyOf(m_target->buildConfigurations(), [&candidate](const BuildConfiguration *bc) {
|
|
|
|
|
return bc->buildDirectory() == candidate; });
|
|
|
|
|
};
|
|
|
|
|
bc->setBuildDirectory(makeUniquelyNumbered(buildDirectory, isBuildDirOk));
|
|
|
|
|
}
|
2010-04-15 13:54:32 +02:00
|
|
|
m_target->addBuildConfiguration(bc);
|
2015-07-28 18:29:52 +02:00
|
|
|
SessionManager::setActiveBuildConfiguration(m_target, bc, SetActive::Cascade);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
2009-11-24 15:36:31 +01:00
|
|
|
void BuildSettingsWidget::deleteConfiguration(BuildConfiguration *deleteConfiguration)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2010-02-08 15:50:06 +01:00
|
|
|
if (!deleteConfiguration ||
|
|
|
|
|
m_target->buildConfigurations().size() <= 1)
|
2008-12-02 12:01:29 +01:00
|
|
|
return;
|
|
|
|
|
|
2013-09-05 14:36:20 +02:00
|
|
|
if (BuildManager::isBuilding(deleteConfiguration)) {
|
2011-10-24 13:10:38 +00:00
|
|
|
QMessageBox box;
|
|
|
|
|
QPushButton *closeAnyway = box.addButton(tr("Cancel Build && Remove Build Configuration"), QMessageBox::AcceptRole);
|
|
|
|
|
QPushButton *cancelClose = box.addButton(tr("Do Not Remove"), QMessageBox::RejectRole);
|
|
|
|
|
box.setDefaultButton(cancelClose);
|
|
|
|
|
box.setWindowTitle(tr("Remove Build Configuration %1?").arg(deleteConfiguration->displayName()));
|
|
|
|
|
box.setText(tr("The build configuration <b>%1</b> is currently being built.").arg(deleteConfiguration->displayName()));
|
|
|
|
|
box.setInformativeText(tr("Do you want to cancel the build process and remove the Build Configuration anyway?"));
|
|
|
|
|
box.exec();
|
|
|
|
|
if (box.clickedButton() != closeAnyway)
|
|
|
|
|
return;
|
2013-09-05 14:36:20 +02:00
|
|
|
BuildManager::cancel();
|
2011-10-24 13:10:38 +00:00
|
|
|
} else {
|
|
|
|
|
QMessageBox msgBox(QMessageBox::Question, tr("Remove Build Configuration?"),
|
|
|
|
|
tr("Do you really want to delete build configuration <b>%1</b>?").arg(deleteConfiguration->displayName()),
|
|
|
|
|
QMessageBox::Yes|QMessageBox::No, this);
|
|
|
|
|
msgBox.setDefaultButton(QMessageBox::No);
|
|
|
|
|
msgBox.setEscapeButton(QMessageBox::No);
|
|
|
|
|
if (msgBox.exec() == QMessageBox::No)
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2010-02-08 15:50:06 +01:00
|
|
|
m_target->removeBuildConfiguration(deleteConfiguration);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|