diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp index e80e95bcede..051a641afbd 100644 --- a/src/plugins/projectexplorer/kitmanager.cpp +++ b/src/plugins/projectexplorer/kitmanager.cpp @@ -370,17 +370,6 @@ const QList KitManager::kitAspects() return Utils::toRawPointer(d->m_informationList); } -KitManagerConfigWidget *KitManager::createConfigWidget(Kit *k) -{ - auto *result = new KitManagerConfigWidget(k); - for (KitAspect *aspect : kitAspects()) - result->addAspectToWorkingCopy(aspect); - - result->updateVisibility(); - - return result; -} - void KitManager::notifyAboutUpdate(Kit *k) { if (!k || !isLoaded()) diff --git a/src/plugins/projectexplorer/kitmanager.h b/src/plugins/projectexplorer/kitmanager.h index bbe96813c7c..439a392ec47 100644 --- a/src/plugins/projectexplorer/kitmanager.h +++ b/src/plugins/projectexplorer/kitmanager.h @@ -54,7 +54,6 @@ class KitAspectWidget; class KitManager; namespace Internal { -class KitManagerConfigWidget; class KitModel; } // namespace Internal @@ -170,8 +169,6 @@ public: static const QList kitAspects(); - static Internal::KitManagerConfigWidget *createConfigWidget(Kit *k); - static bool registerKit(std::unique_ptr &&k); static void deregisterKit(Kit *k); static void setDefaultKit(Kit *k); diff --git a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp index 20c006bc21d..6dad16eeae9 100644 --- a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp +++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp @@ -121,6 +121,11 @@ KitManagerConfigWidget::KitManagerConfigWidget(Kit *k) : auto chooser = new Core::VariableChooser(this); chooser->addSupportedWidget(m_nameEdit); chooser->addMacroExpanderProvider([this]() { return m_modifiedKit->macroExpander(); }); + + for (KitAspect *aspect : KitManager::kitAspects()) + addAspectToWorkingCopy(aspect); + + updateVisibility(); } KitManagerConfigWidget::~KitManagerConfigWidget() diff --git a/src/plugins/projectexplorer/kitmodel.cpp b/src/plugins/projectexplorer/kitmodel.cpp index dbc04d559fa..80e613fbf5a 100644 --- a/src/plugins/projectexplorer/kitmodel.cpp +++ b/src/plugins/projectexplorer/kitmodel.cpp @@ -46,7 +46,7 @@ class KitNode : public TreeItem public: KitNode(Kit *k) { - widget = KitManager::createConfigWidget(k); + widget = new KitManagerConfigWidget(k); if (widget) { if (k && k->isAutoDetected()) widget->makeStickySubWidgetsReadOnly();