| 213 | } |
| 214 | |
| 215 | int 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 | |
| 236 | void CheckSetSelectionListModel::removeCheckSetSelection(int row) |
| 237 | { |
no test coverage detected