ProjectExplorer: Consolidate creation of KitAspect's "Manage..."

Change-Id: I001a21f41bcd5ff0614bdf98893b56137c06546f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-08-22 10:25:30 +02:00
parent 04eea22c5f
commit fc7c11fb65
10 changed files with 41 additions and 52 deletions

View File

@@ -17,9 +17,10 @@ ToolKitAspectWidget::ToolKitAspectWidget(ProjectExplorer::Kit *kit,
ToolType type)
: ProjectExplorer::KitAspect(kit, factory)
, m_toolsComboBox(createSubWidget<QComboBox>())
, m_manageButton(createManageButton(Constants::SettingsPage::TOOLS_ID))
, m_type{type}
{
setManagingPage(Constants::SettingsPage::TOOLS_ID);
m_toolsComboBox->setSizePolicy(QSizePolicy::Ignored,
m_toolsComboBox->sizePolicy().verticalPolicy());
m_toolsComboBox->setEnabled(false);
@@ -37,7 +38,6 @@ ToolKitAspectWidget::ToolKitAspectWidget(ProjectExplorer::Kit *kit,
ToolKitAspectWidget::~ToolKitAspectWidget()
{
delete m_toolsComboBox;
delete m_manageButton;
}
void ToolKitAspectWidget::addTool(const MesonTools::Tool_t &tool)

View File

@@ -40,7 +40,6 @@ private:
{
addMutableAction(m_toolsComboBox);
parent.addItem(m_toolsComboBox);
parent.addItem(m_manageButton);
}
void refresh() override
@@ -58,7 +57,6 @@ private:
}
QComboBox *m_toolsComboBox;
QWidget *m_manageButton;
ToolType m_type;
};