forked from qt-creator/qt-creator
Clang: Clean up some names in ClangProjectSettingsWidget
Clarify some names and encode the widget type as suffix. Change-Id: Id0d3b3a3df16df60af806ad6aa60b0269a1bde0a Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -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<void (QComboBox::*)(int)>(&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();
|
||||
|
||||
Reference in New Issue
Block a user