forked from qt-creator/qt-creator
ProjectExplorer: Consolidate creation of KitAspect's "Manage..."
Change-Id: I001a21f41bcd5ff0614bdf98893b56137c06546f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user