ProjectExplorer: Simplify KitAspect::addToLayoutWithLabel()

The parent widget was not used anymore.

Change-Id: I57bb024b770c01efc68bb722623bcc7fb565cfeb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2023-08-21 18:32:33 +02:00
parent 4e23f2a6eb
commit 45e3fa1621
4 changed files with 6 additions and 7 deletions

View File

@@ -651,13 +651,13 @@ void CMakeBuildSettingsWidget::kitCMakeConfiguration()
Layouting::Grid grid;
KitAspect *widget = CMakeKitAspect::createKitAspect(m_buildConfig->kit());
widget->setParent(dialog);
widget->addToLayoutWithLabel(grid, dialog);
widget->addToLayoutWithLabel(grid);
widget = CMakeGeneratorKitAspect::createKitAspect(m_buildConfig->kit());
widget->setParent(dialog);
widget->addToLayoutWithLabel(grid, dialog);
widget->addToLayoutWithLabel(grid);
widget = CMakeConfigurationKitAspect::createKitAspect(m_buildConfig->kit());
widget->setParent(dialog);
widget->addToLayoutWithLabel(grid, dialog);
widget->addToLayoutWithLabel(grid);
grid.attachTo(dialog);
auto layout = qobject_cast<QGridLayout *>(dialog->layout());

View File

@@ -734,9 +734,8 @@ KitAspect::~KitAspect()
delete m_mutableAction;
}
void KitAspect::addToLayoutWithLabel(Layouting::LayoutItem &parentItem, QWidget *parent)
void KitAspect::addToLayoutWithLabel(Layouting::LayoutItem &parentItem)
{
QTC_ASSERT(parent, return);
auto label = createSubWidget<QLabel>(m_factory->displayName() + ':');
label->setToolTip(m_factory->description());
connect(label, &QLabel::linkActivated, this, [this](const QString &link) {

View File

@@ -113,7 +113,7 @@ public:
virtual void makeReadOnly() = 0;
virtual void refresh() = 0;
void addToLayoutWithLabel(Layouting::LayoutItem &parentItem, QWidget *parent);
void addToLayoutWithLabel(Layouting::LayoutItem &parentItem);
static QString msgManage();

View File

@@ -201,7 +201,7 @@ void KitManagerConfigWidget::addAspectToWorkingCopy(Layouting::LayoutItem &paren
QTC_ASSERT(aspect, return);
QTC_ASSERT(!m_kitAspects.contains(aspect), return);
aspect->addToLayoutWithLabel(parent, this);
aspect->addToLayoutWithLabel(parent);
m_kitAspects.append(aspect);
connect(aspect->mutableAction(), &QAction::toggled,