| 101 | } |
| 102 | |
| 103 | void CheckSetSelectionListModel::store() const |
| 104 | { |
| 105 | if (!m_edited.isEmpty()) { |
| 106 | QVector<CheckSetSelection> m_checkSetSelectionsToSave; |
| 107 | for (const auto& selection : std::as_const(m_checkSetSelections)) { |
| 108 | const auto id = selection.id(); |
| 109 | if (m_edited.contains(id)) { |
| 110 | m_checkSetSelectionsToSave.append(selection); |
| 111 | } |
| 112 | } |
| 113 | m_checkSetSelectionManager->saveCheckSetSelections(m_checkSetSelectionsToSave); |
| 114 | } |
| 115 | m_checkSetSelectionManager->setDefaultCheckSetSelection(m_defaultCheckSetSelectionId); |
| 116 | m_checkSetSelectionManager->removeCheckSetSelections(m_removed); |
| 117 | |
| 118 | m_added.clear(); |
| 119 | m_edited.clear(); |
| 120 | m_removed.clear(); |
| 121 | m_defaultChanged = false; |
| 122 | } |
| 123 | |
| 124 | |
| 125 | QString CheckSetSelectionListModel::checkSetSelectionId(const QModelIndex& index) const |
nothing calls this directly
no test coverage detected