forked from qt-creator/qt-creator
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:
@@ -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());
|
||||
|
@@ -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) {
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user