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

Method cloneSelectedCheckSetSelection

plugins/clazy/config/checksetmanagewidget.cpp:243–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void CheckSetManageWidget::cloneSelectedCheckSetSelection()
244{
245 const int currentIndex = m_ui.checkSetSelect->currentIndex();
246 Q_ASSERT(currentIndex >= 0);
247 const auto currentCheckSetSelectionName = m_checkSetSelectionListModel->checkSetSelectionName(currentIndex);
248 // pass original name as starting name, as the user might want to enter a variant of it
249 const auto checkSetSelectionName = askNewCheckSetSelectionName(currentCheckSetSelectionName);
250 if (checkSetSelectionName.isEmpty()) {
251 return;
252 }
253
254 const int checkSetSelectionIndex = m_checkSetSelectionListModel->cloneCheckSetSelection(checkSetSelectionName, currentIndex);
255
256 m_ui.checkSetSelect->setCurrentIndex(checkSetSelectionIndex);
257 m_ui.enabledChecks->setFocus(Qt::OtherFocusReason);
258}
259
260void CheckSetManageWidget::removeSelectedCheckSetSelection()
261{

Callers

nothing calls this directly

Calls 5

setCurrentIndexMethod · 0.80
currentIndexMethod · 0.45
checkSetSelectionNameMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected