forked from qt-creator/qt-creator
ClangTools: Show hint when disabling "Build the project before analysis."
Show also the same hint as a tooltip. Fixes: QTCREATORBUG-22382 Change-Id: If1b594994cea387d6727775ce4c28c21d51f2d86 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -295,6 +295,7 @@ SelectableFilesDialog::SelectableFilesDialog(const ProjectInfo &projectInfo,
|
||||
CppTools::ClangDiagnosticConfigsSelectionWidget *diagnosticConfigsSelectionWidget
|
||||
= m_ui->clangToolsBasicSettings->ui()->clangDiagnosticConfigsSelectionWidget;
|
||||
QCheckBox *buildBeforeAnalysis = m_ui->clangToolsBasicSettings->ui()->buildBeforeAnalysis;
|
||||
buildBeforeAnalysis->setToolTip(hintAboutBuildBeforeAnalysis());
|
||||
|
||||
ClangToolsProjectSettings *settings = ClangToolsProjectSettingsManager::getSettings(m_project);
|
||||
m_customDiagnosticConfig = diagnosticConfiguration(settings);
|
||||
@@ -337,6 +338,8 @@ SelectableFilesDialog::SelectableFilesDialog(const ProjectInfo &projectInfo,
|
||||
m_customDiagnosticConfig = currentConfigId;
|
||||
});
|
||||
connect(buildBeforeAnalysis, &QCheckBox::toggled, [this](bool checked) {
|
||||
if (!checked)
|
||||
showHintAboutBuildBeforeAnalysis();
|
||||
if (m_ui->globalOrCustom->currentIndex() == CustomSettings)
|
||||
m_buildBeforeAnalysis = checked;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user