| 129 | } |
| 130 | |
| 131 | void 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 | |
| 154 | void MesonConfigPage::checkStatus() |
| 155 | { |
no test coverage detected