| 39 | } |
| 40 | |
| 41 | ProblemModel* ProblemModelSet::findModel(const QString &id) const |
| 42 | { |
| 43 | Q_D(const ProblemModelSet); |
| 44 | |
| 45 | auto it = std::find_if(d->data.constBegin(), d->data.constEnd(), [&](const ModelData& data) { |
| 46 | return (data.id == id); |
| 47 | }); |
| 48 | |
| 49 | return (it != d->data.constEnd()) ? it->model : nullptr; |
| 50 | } |
| 51 | |
| 52 | void ProblemModelSet::removeModel(const QString &id) |
| 53 | { |