forked from qt-creator/qt-creator
ProjectExplorer: Remove RunConfiguration::fillConfigurationLayout
Instead of using a hard-coded list of well-known (optional) aspects, add all aspects, so there is no need for special treatment of RunConfiguration with unusual/custom aspects needed. Price and benefit is that the individual run configs are again responsible for the aspect display order which is determined from the aspect construction order. Change-Id: Iff2656b2e358c0f0f789d4c006a5c44d0a1536a5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -258,31 +258,16 @@ QWidget *RunConfiguration::createConfigurationWidget()
|
||||
auto widget = new QWidget;
|
||||
auto formLayout = new QFormLayout(widget);
|
||||
|
||||
fillConfigurationLayout(formLayout);
|
||||
for (IRunConfigurationAspect *aspect : m_aspects) {
|
||||
if (aspect->m_visible)
|
||||
aspect->addToConfigurationLayout(formLayout);
|
||||
}
|
||||
|
||||
Core::VariableChooser::addSupportForChildWidgets(widget, macroExpander());
|
||||
|
||||
return wrapWidget(widget);
|
||||
}
|
||||
|
||||
void RunConfiguration::fillConfigurationLayout(QFormLayout *layout) const
|
||||
{
|
||||
if (auto aspect = extraAspect<ExecutableAspect>())
|
||||
aspect->addToConfigurationLayout(layout);
|
||||
if (auto aspect = extraAspect<SymbolFileAspect>())
|
||||
aspect->addToConfigurationLayout(layout);
|
||||
if (auto aspect = extraAspect<ArgumentsAspect>())
|
||||
aspect->addToConfigurationLayout(layout);
|
||||
if (auto aspect = extraAspect<WorkingDirectoryAspect>())
|
||||
aspect->addToConfigurationLayout(layout);
|
||||
if (auto aspect = extraAspect<TerminalAspect>())
|
||||
aspect->addToConfigurationLayout(layout);
|
||||
if (auto aspect = extraAspect<UseLibraryPathsAspect>())
|
||||
aspect->addToConfigurationLayout(layout);
|
||||
if (auto aspect = extraAspect<UseDyldSuffixAspect>())
|
||||
aspect->addToConfigurationLayout(layout);
|
||||
}
|
||||
|
||||
void RunConfiguration::updateEnabledState()
|
||||
{
|
||||
Project *p = target()->project();
|
||||
|
||||
Reference in New Issue
Block a user