| 271 | } |
| 272 | |
| 273 | void ProblemModel::addProblem(const IProblem::Ptr &problem) |
| 274 | { |
| 275 | Q_D(ProblemModel); |
| 276 | |
| 277 | if (d->m_isPlaceholderShown) { |
| 278 | setProblems({ problem }); |
| 279 | } else { |
| 280 | int c = d->m_problems->count(); |
| 281 | beginInsertRows(QModelIndex(), c, c); |
| 282 | d->m_problems->addProblem(problem); |
| 283 | endInsertRows(); |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | void ProblemModel::setProblems(const QVector<IProblem::Ptr> &problems) |
| 288 | { |
nothing calls this directly
no test coverage detected