| 171 | } |
| 172 | |
| 173 | void CMakePreferences::configureCacheView() |
| 174 | { |
| 175 | // Sets up the cache view after model re-creation/reset. |
| 176 | // Emits changed(false) because model re-creation probably means |
| 177 | // mass programmatical invocation of itemChanged(), which invokes changed(true) - which is not what we want. |
| 178 | m_prefsUi->cacheList->setModel(m_currentModel); |
| 179 | m_prefsUi->cacheList->hideColumn(1); |
| 180 | m_prefsUi->cacheList->hideColumn(3); |
| 181 | m_prefsUi->cacheList->hideColumn(4); |
| 182 | m_prefsUi->cacheList->hideColumn(5); |
| 183 | m_prefsUi->cacheList->horizontalHeader()->resizeSection(0, 200); |
| 184 | |
| 185 | if( m_currentModel ) { |
| 186 | m_prefsUi->cacheList->setEnabled( true ); |
| 187 | const auto persistentIndices = m_currentModel->persistentIndices(); |
| 188 | for (const QModelIndex& idx : persistentIndices) { |
| 189 | m_prefsUi->cacheList->openPersistentEditor(idx); |
| 190 | } |
| 191 | } else { |
| 192 | m_prefsUi->cacheList->setEnabled( false ); |
| 193 | } |
| 194 | |
| 195 | showInternal(m_prefsUi->showInternal->checkState()); |
| 196 | } |
| 197 | |
| 198 | void CMakePreferences::updateCache(const Path &newBuildDir) |
| 199 | { |
nothing calls this directly
no test coverage detected