diff --git a/src/plugins/clangcodemodel/clangprojectsettingswidget.cpp b/src/plugins/clangcodemodel/clangprojectsettingswidget.cpp index 2e0db6b6bcb..563bdd0913e 100644 --- a/src/plugins/clangcodemodel/clangprojectsettingswidget.cpp +++ b/src/plugins/clangcodemodel/clangprojectsettingswidget.cpp @@ -59,19 +59,19 @@ ClangProjectSettingsWidget::ClangProjectSettingsWidget(ProjectExplorer::Project using namespace CppTools; - m_ui.delayedTemplateParse->setVisible(Utils::HostOsInfo::isWindowsHost()); + m_ui.delayedTemplateParseCheckBox->setVisible(Utils::HostOsInfo::isWindowsHost()); - m_ui.clangSettings->setCurrentIndex(m_projectSettings.useGlobalConfig() ? 0 : 1); + m_ui.globalOrCustomComboBox->setCurrentIndex(m_projectSettings.useGlobalConfig() ? 0 : 1); connect(m_ui.clangDiagnosticConfigsSelectionWidget, &ClangDiagnosticConfigsSelectionWidget::currentConfigChanged, this, &ClangProjectSettingsWidget::onCurrentWarningConfigChanged); - connect(m_ui.delayedTemplateParse, &QCheckBox::toggled, + connect(m_ui.delayedTemplateParseCheckBox, &QCheckBox::toggled, this, &ClangProjectSettingsWidget::onDelayedTemplateParseClicked); - connect(m_ui.clangSettings, + connect(m_ui.globalOrCustomComboBox, static_cast(&QComboBox::currentIndexChanged), - this, &ClangProjectSettingsWidget::onClangSettingsChanged); + this, &ClangProjectSettingsWidget::onGlobalCustomChanged); connect(project, &ProjectExplorer::Project::aboutToSaveSettings, this, &ClangProjectSettingsWidget::onAboutToSaveProjectSettings); @@ -104,7 +104,7 @@ void ClangProjectSettingsWidget::onDelayedTemplateParseClicked(bool checked) m_projectSettings.setCommandLineOptions(options); } -void ClangProjectSettingsWidget::onClangSettingsChanged(int index) +void ClangProjectSettingsWidget::onGlobalCustomChanged(int index) { m_projectSettings.setUseGlobalConfig(index == 0 ? true : false); syncOtherWidgetsToComboBox(); @@ -118,11 +118,11 @@ void ClangProjectSettingsWidget::onAboutToSaveProjectSettings() void ClangProjectSettingsWidget::syncOtherWidgetsToComboBox() { const QStringList options = m_projectSettings.commandLineOptions(); - m_ui.delayedTemplateParse->setChecked( - options.contains(QLatin1String{ClangProjectSettings::DelayedTemplateParsing})); + m_ui.delayedTemplateParseCheckBox->setChecked( + options.contains(QLatin1String{ClangProjectSettings::DelayedTemplateParsing})); const bool isCustom = !m_projectSettings.useGlobalConfig(); - m_ui.delayedTemplateParse->setEnabled(isCustom); + m_ui.delayedTemplateParseCheckBox->setEnabled(isCustom); for (int i = 0; i < m_ui.clangDiagnosticConfigsSelectionWidget->layout()->count(); ++i) { QWidget *widget = m_ui.clangDiagnosticConfigsSelectionWidget->layout()->itemAt(i)->widget(); diff --git a/src/plugins/clangcodemodel/clangprojectsettingswidget.h b/src/plugins/clangcodemodel/clangprojectsettingswidget.h index de4c52d798b..50010673b92 100644 --- a/src/plugins/clangcodemodel/clangprojectsettingswidget.h +++ b/src/plugins/clangcodemodel/clangprojectsettingswidget.h @@ -46,7 +46,7 @@ public: private: void onCurrentWarningConfigChanged(const Core::Id ¤tConfigId); void onDelayedTemplateParseClicked(bool); - void onClangSettingsChanged(int index); + void onGlobalCustomChanged(int index); void onAboutToSaveProjectSettings(); void syncOtherWidgetsToComboBox(); diff --git a/src/plugins/clangcodemodel/clangprojectsettingswidget.ui b/src/plugins/clangcodemodel/clangprojectsettingswidget.ui index 88177c235f6..fe5036ec11b 100644 --- a/src/plugins/clangcodemodel/clangprojectsettingswidget.ui +++ b/src/plugins/clangcodemodel/clangprojectsettingswidget.ui @@ -15,7 +15,7 @@ - + 0 @@ -35,7 +35,7 @@ - + Parse templates in a MSVC-compliant way. This helps to parse headers for example from Active Template Library (ATL) or Windows Runtime Library (WRL). However, using the relaxed and extended rules means also that no highlighting/completion can be provided within template functions.