forked from qt-creator/qt-creator
CMake: Checkbox for showing advanced options by default
Change-Id: I32f6ca068de60adf90eb0d9bc5eb7cfadc613e2d Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
@@ -299,6 +299,9 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildSystem *bs) :
|
||||
|
||||
m_showAdvancedCheckBox = new QCheckBox(Tr::tr("Advanced"));
|
||||
|
||||
CMakeSpecificSettings *settings = CMakeProjectPlugin::projectTypeSpecificSettings();
|
||||
m_showAdvancedCheckBox->setChecked(settings->showAdvancedOptionsByDefault.value());
|
||||
|
||||
connect(m_configView->selectionModel(), &QItemSelectionModel::selectionChanged,
|
||||
this, [this](const QItemSelection &, const QItemSelection &) {
|
||||
updateSelection();
|
||||
|
@@ -58,6 +58,12 @@ CMakeSpecificSettings::CMakeSpecificSettings()
|
||||
showSourceSubFolders.setDefaultValue(true);
|
||||
showSourceSubFolders.setLabelText(
|
||||
::CMakeProjectManager::Tr::tr("Show subfolders inside source group folders"));
|
||||
|
||||
registerAspect(&showAdvancedOptionsByDefault);
|
||||
showAdvancedOptionsByDefault.setSettingsKey("ShowAdvancedOptionsByDefault");
|
||||
showAdvancedOptionsByDefault.setDefaultValue(false);
|
||||
showAdvancedOptionsByDefault.setLabelText(
|
||||
::CMakeProjectManager::Tr::tr("Show advanced options by default"));
|
||||
}
|
||||
|
||||
// CMakeSpecificSettingsPage
|
||||
@@ -82,6 +88,7 @@ CMakeSpecificSettingsPage::CMakeSpecificSettingsPage(CMakeSpecificSettings *sett
|
||||
s.packageManagerAutoSetup,
|
||||
s.askBeforeReConfigureInitialParams,
|
||||
s.showSourceSubFolders,
|
||||
s.showAdvancedOptionsByDefault,
|
||||
st
|
||||
}.attachTo(widget);
|
||||
});
|
||||
|
@@ -25,6 +25,7 @@ public:
|
||||
Utils::BoolAspect packageManagerAutoSetup;
|
||||
Utils::BoolAspect askBeforeReConfigureInitialParams;
|
||||
Utils::BoolAspect showSourceSubFolders;
|
||||
Utils::BoolAspect showAdvancedOptionsByDefault;
|
||||
};
|
||||
|
||||
class CMakeSpecificSettingsPage final : public Core::IOptionsPage
|
||||
|
Reference in New Issue
Block a user