Commit 109cb041 authored by dt's avatar dt
Browse files

Fix CMake Project to work with new project settigns pane.

parent 8c5023b3
......@@ -713,7 +713,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeProject *project)
: m_project(project)
{
QFormLayout *fl = new QFormLayout(this);
fl->setContentsMargins(0, -1, 0, -1);
fl->setContentsMargins(20, -1, 0, -1);
fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
setLayout(fl);
m_pathLineEdit = new QLineEdit(this);
......
......@@ -145,18 +145,6 @@ void MakeStep::setAdditionalArguments(const QString &buildConfiguration, const Q
setValue(buildConfiguration, "additionalArguments", list);
}
// TODO
//QString MakeStep::oneLineSummary(const QString &buildConfiguration)
//{
// QStringList arguments = value(buildConfiguration, "buildTargets").toStringList();
// arguments << additionalArguments(buildConfiguration);
// return tr("<b>%1 %2</b> in %3").arg(
// m_pro->toolChain(buildConfiguration)->makeCommand(),
// arguments.join(" "),
// m_pro->buildDirectory(buildConfiguration));
//
//}
//
// MakeStepConfigWidget
//
......@@ -192,11 +180,13 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
void MakeStepConfigWidget::additionalArgumentsEdited()
{
m_makeStep->setAdditionalArguments(m_buildConfiguration, ProjectExplorer::Environment::parseCombinedArgString(m_additionalArguments->text()));
updateDetails();
}
void MakeStepConfigWidget::itemChanged(QListWidgetItem *item)
{
m_makeStep->setBuildTarget(m_buildConfiguration, item->text(), item->checkState() & Qt::Checked);
updateDetails();
}
QString MakeStepConfigWidget::displayName() const
......@@ -224,12 +214,22 @@ void MakeStepConfigWidget::init(const QString &buildConfiguration)
connect(m_targetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*)));
m_additionalArguments->setText(ProjectExplorer::Environment::joinArgumentList(m_makeStep->additionalArguments(m_buildConfiguration)));
updateDetails();
}
void MakeStepConfigWidget::updateDetails()
{
QStringList arguments = m_makeStep->value(m_buildConfiguration, "buildTargets").toStringList();
arguments << m_makeStep->additionalArguments(m_buildConfiguration);
m_summaryText = tr("<b>Make:</b>%1 %2")
.arg(m_makeStep->project()->toolChain(m_buildConfiguration)->makeCommand(),
arguments.join(" "));
emit updateSummary();
}
QString MakeStepConfigWidget::summaryText() const
{
// TODO
return tr("<b>Make:</b>");
return m_summaryText;
}
//
......
......@@ -83,10 +83,12 @@ private slots:
void itemChanged(QListWidgetItem*);
void additionalArgumentsEdited();
private:
void updateDetails();
QString m_buildConfiguration;
MakeStep *m_makeStep;
QListWidget *m_targetsList;
QLineEdit *m_additionalArguments;
QString m_summaryText;
};
class MakeStepFactory : public ProjectExplorer::IBuildStepFactory
......
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