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

Method removeSelectedProfile

kdevplatform/shell/settings/environmentwidget.cpp:294–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294void EnvironmentWidget::removeSelectedProfile()
295{
296 if (ui.profileSelect->count() <= 1) {
297 return;
298 }
299
300 const int selectedProfileIndex = ui.profileSelect->currentIndex();
301
302 m_environmentProfileListModel->removeProfile(selectedProfileIndex);
303
304 const int defaultProfileIndex = m_environmentProfileListModel->defaultProfileIndex();
305 ui.profileSelect->setCurrentIndex(defaultProfileIndex);
306}
307
308void EnvironmentWidget::onDefaultProfileChanged(int defaultProfileIndex)
309{

Callers

nothing calls this directly

Calls 5

defaultProfileIndexMethod · 0.80
setCurrentIndexMethod · 0.80
countMethod · 0.45
currentIndexMethod · 0.45
removeProfileMethod · 0.45

Tested by

no test coverage detected