MCPcopy Create free account
hub / github.com/KDE/kdevelop / ProjectConfigPage

Method ProjectConfigPage

plugins/clazy/config/projectconfigpage.cpp:25–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23{
24
25ProjectConfigPage::ProjectConfigPage(Plugin* plugin, KDevelop::IProject* project,
26 CheckSetSelectionManager* checkSetSelectionManager,
27 QWidget* parent)
28 : ConfigPage(plugin, nullptr, parent)
29 , m_checkSetSelections(checkSetSelectionManager->checkSetSelections())
30 , m_defaultCheckSetSelectionId(checkSetSelectionManager->defaultCheckSetSelectionId())
31{
32 Q_ASSERT(plugin);
33
34 m_settings = new ProjectSettings;
35 m_settings->setSharedConfig(project->projectConfiguration());
36 m_settings->load();
37 setConfigSkeleton(m_settings);
38
39 m_ui.setupUi(this);
40
41 if (plugin->checksDB()->isValid()) {
42 m_ui.dbError->setVisible(false);
43 } else {
44 m_ui.dbError->setText(plugin->checksDB()->error());
45 m_ui.dbError->setVisible(true);
46
47 m_ui.tabWidget->setVisible(false);
48 m_ui.commandLineWidget->setVisible(false);
49 return;
50 }
51
52 configSkeleton()->setSharedConfig(project->projectConfiguration());
53 configSkeleton()->load();
54
55 // =============================================================================================
56
57 m_ui.kcfg_checkSetSelection->setCheckSetSelections(m_checkSetSelections, m_defaultCheckSetSelectionId);
58 m_ui.checks->setChecksDb(plugin->checksDB());
59 connect(m_ui.checks, &ChecksWidget::checksChanged,
60 this, &ProjectConfigPage::updateCommandLine);
61
62 connect(m_ui.kcfg_checkSetSelection, &CheckSetSelectionComboBox::selectionChanged,
63 this, &ProjectConfigPage::onSelectionChanged);
64 connect(m_ui.checks, &ChecksWidget::checksChanged,
65 this, &ProjectConfigPage::onChecksChanged);
66
67 // =============================================================================================
68
69 QCheckBox* const commandLineCheckBoxes[] = {
70 m_ui.kcfg_onlyQt,
71 m_ui.kcfg_qtDeveloper,
72 m_ui.kcfg_qt4Compat,
73 m_ui.kcfg_visitImplicitCode,
74 m_ui.kcfg_ignoreIncludedFiles,
75 m_ui.kcfg_enableAllFixits,
76 m_ui.kcfg_noInplaceFixits,
77 };
78 for (auto* checkBox : commandLineCheckBoxes) {
79 connect(checkBox, &QCheckBox::stateChanged,
80 this, &ProjectConfigPage::updateCommandLine);
81 }
82 QLineEdit* const commandLineLineEdits[] = {

Callers

nothing calls this directly

Calls 14

setupUiMethod · 0.80
checksDBMethod · 0.80
setChecksDbMethod · 0.80
setPlaceholderTextMethod · 0.80
checkSetSelectionsMethod · 0.45
projectConfigurationMethod · 0.45
loadMethod · 0.45
isValidMethod · 0.45
setVisibleMethod · 0.45
setTextMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected