forked from qt-creator/qt-creator
CMake: Simplify CMakeBuildSettingsWidget::kitCMakeConfiguration()
Change-Id: Ie64500c42128f5e38ebdd83b0853a016e36cfc0d Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -704,27 +704,19 @@ void CMakeBuildSettingsWidget::kitCMakeConfiguration()
|
|||||||
m_buildConfig->kit()->unblockNotification();
|
m_buildConfig->kit()->unblockNotification();
|
||||||
});
|
});
|
||||||
|
|
||||||
Layouting::Grid grid;
|
Kit *kit = m_buildConfig->kit();
|
||||||
KitAspect *widget = CMakeKitAspect::createKitAspect(m_buildConfig->kit());
|
|
||||||
widget->setParent(dialog);
|
|
||||||
widget->addToLayout(grid);
|
|
||||||
widget = CMakeGeneratorKitAspect::createKitAspect(m_buildConfig->kit());
|
|
||||||
widget->setParent(dialog);
|
|
||||||
widget->addToLayout(grid);
|
|
||||||
widget = CMakeConfigurationKitAspect::createKitAspect(m_buildConfig->kit());
|
|
||||||
widget->setParent(dialog);
|
|
||||||
widget->addToLayout(grid);
|
|
||||||
grid.attachTo(dialog);
|
|
||||||
|
|
||||||
auto layout = qobject_cast<QGridLayout *>(dialog->layout());
|
|
||||||
|
|
||||||
layout->setColumnStretch(1, 1);
|
|
||||||
|
|
||||||
auto buttons = new QDialogButtonBox(QDialogButtonBox::Close);
|
auto buttons = new QDialogButtonBox(QDialogButtonBox::Close);
|
||||||
connect(buttons, &QDialogButtonBox::clicked, dialog, &QDialog::close);
|
connect(buttons, &QDialogButtonBox::clicked, dialog, &QDialog::close);
|
||||||
layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Maximum, QSizePolicy::MinimumExpanding),
|
|
||||||
4, 0);
|
using namespace Layouting;
|
||||||
layout->addWidget(buttons, 5, 0, 1, -1);
|
Grid {
|
||||||
|
CMakeKitAspect::createKitAspect(kit),
|
||||||
|
CMakeGeneratorKitAspect::createKitAspect(kit),
|
||||||
|
CMakeConfigurationKitAspect::createKitAspect(kit),
|
||||||
|
empty, empty, buttons,
|
||||||
|
columnStretch(1, 1)
|
||||||
|
}.attachTo(dialog);
|
||||||
|
|
||||||
dialog->setMinimumWidth(400);
|
dialog->setMinimumWidth(400);
|
||||||
dialog->resize(800, 1);
|
dialog->resize(800, 1);
|
||||||
|
Reference in New Issue
Block a user