| 180 | } |
| 181 | |
| 182 | bool mergeWith(const QUndoCommand *command) override |
| 183 | { |
| 184 | auto cmd = static_cast<const SetBootEntryValueCommand<Type> *>(command); |
| 185 | if(&cmd->model != &model) |
| 186 | return false; |
| 187 | |
| 188 | if(cmd->index != index) |
| 189 | return false; |
| 190 | |
| 191 | if(cmd->property != property) |
| 192 | return false; |
| 193 | |
| 194 | auto &entry = model.entries.at(index.row()); |
| 195 | if(value == entry.*property) |
| 196 | setObsolete(true); |
| 197 | |
| 198 | setText(QObject::tr("Change %1 entry \"%2\" %3 to \"%4\"").arg(model.name, title, name).arg(static_cast<underlying_type_t<Type>>(entry.*property))); |
| 199 | return true; |
| 200 | } |
| 201 | }; |
| 202 | |
| 203 | class ChangeOptionalDataFormatCommand: public QUndoCommand |
nothing calls this directly
no outgoing calls
no test coverage detected