forked from qt-creator/qt-creator
Project: Inline RunConfiguration::wrapWidget helper again
There are no external users left, so there's no need to expose it in the header anymore. Also saves a cast. Change-Id: I1ced368ebc9588cbc0058cc7d37f39ab80f9c595 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -224,6 +224,8 @@ QWidget *RunConfiguration::createConfigurationWidget()
|
||||
{
|
||||
auto widget = new QWidget;
|
||||
auto formLayout = new QFormLayout(widget);
|
||||
formLayout->setMargin(0);
|
||||
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
||||
|
||||
for (ProjectConfigurationAspect *aspect : m_aspects) {
|
||||
if (aspect->isVisible())
|
||||
@@ -232,7 +234,10 @@ QWidget *RunConfiguration::createConfigurationWidget()
|
||||
|
||||
Core::VariableChooser::addSupportForChildWidgets(widget, macroExpander());
|
||||
|
||||
return wrapWidget(widget);
|
||||
auto detailsWidget = new Utils::DetailsWidget;
|
||||
detailsWidget->setState(DetailsWidget::NoSummary);
|
||||
detailsWidget->setWidget(widget);
|
||||
return detailsWidget;
|
||||
}
|
||||
|
||||
void RunConfiguration::updateEnabledState()
|
||||
@@ -282,18 +287,6 @@ BuildConfiguration *RunConfiguration::activeBuildConfiguration() const
|
||||
return target()->activeBuildConfiguration();
|
||||
}
|
||||
|
||||
QWidget *RunConfiguration::wrapWidget(QWidget *inner) const
|
||||
{
|
||||
auto detailsWidget = new Utils::DetailsWidget;
|
||||
detailsWidget->setState(DetailsWidget::NoSummary);
|
||||
detailsWidget->setWidget(inner);
|
||||
if (auto fl = qobject_cast<QFormLayout *>(inner->layout())){
|
||||
fl->setMargin(0);
|
||||
fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
||||
}
|
||||
return detailsWidget;
|
||||
}
|
||||
|
||||
Target *RunConfiguration::target() const
|
||||
{
|
||||
return static_cast<Target *>(parent());
|
||||
|
||||
@@ -205,7 +205,6 @@ protected:
|
||||
|
||||
/// convenience function to get current build configuration.
|
||||
BuildConfiguration *activeBuildConfiguration() const;
|
||||
QWidget *wrapWidget(QWidget *inner) const;
|
||||
|
||||
template<class T> void setOutputFormatter()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user