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

Method configureCacheView

plugins/cmake/settings/cmakepreferences.cpp:173–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void 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
198void CMakePreferences::updateCache(const Path &newBuildDir)
199{

Callers

nothing calls this directly

Calls 4

persistentIndicesMethod · 0.80
checkStateMethod · 0.80
setModelMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected