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

Method cloneCheckSetSelection

plugins/clazy/config/checksetselectionlistmodel.cpp:215–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215int CheckSetSelectionListModel::cloneCheckSetSelection(const QString& name, int row)
216{
217 const int newRow = m_checkSetSelections.count();
218 beginInsertRows(QModelIndex(), newRow, newRow);
219
220 const CheckSetSelection& original = m_checkSetSelections.at(row);
221 CheckSetSelection checkSetSelection(original);
222 const QString id = QUuid::createUuid().toString();
223 checkSetSelection.setId(id);
224 checkSetSelection.setName(name);
225
226 m_checkSetSelections.append(checkSetSelection);
227
228 m_added.append(id);
229 m_edited.insert(id);
230
231 endInsertRows();
232
233 return newRow;
234}
235
236void CheckSetSelectionListModel::removeCheckSetSelection(int row)
237{

Callers 1

Calls 8

QModelIndexClass · 0.50
countMethod · 0.45
atMethod · 0.45
toStringMethod · 0.45
setIdMethod · 0.45
setNameMethod · 0.45
appendMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected