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

Method reset

plugins/meson/settings/mesonconfigpage.cpp:131–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void MesonConfigPage::reset()
132{
133 if (m_config.buildDirs.isEmpty()) {
134 m_config.currentIndex = -1;
135 m_ui->i_buildDirs->clear();
136 setWidgetsDisabled(true);
137 m_ui->b_addDir->setDisabled(false); // Allow adding a new build dir when there are none
138 return;
139 } else if (m_config.currentIndex < 0 || m_config.currentIndex >= m_config.buildDirs.size()) {
140 m_config.currentIndex = 0;
141 m_ui->i_buildDirs->blockSignals(true);
142 m_ui->i_buildDirs->setCurrentIndex(m_config.currentIndex);
143 m_ui->i_buildDirs->blockSignals(false);
144 }
145
146 setWidgetsDisabled(false);
147 qCDebug(KDEV_Meson) << "Resetting changes for build dir " << m_current.buildDir;
148
149 m_current = m_config.buildDirs[m_config.currentIndex];
150 m_ui->options->repopulateFromBuildDir(m_project, m_current)->start();
151 updateUI();
152}
153
154void MesonConfigPage::checkStatus()
155{

Callers 1

resetAllMethod · 0.45

Calls 6

setCurrentIndexMethod · 0.80
isEmptyMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected