| 976 | } |
| 977 | |
| 978 | void TopDUContext::addProblem(const ProblemPointer& problem) |
| 979 | { |
| 980 | ENSURE_CAN_WRITE |
| 981 | |
| 982 | Q_ASSERT(problem); |
| 983 | |
| 984 | auto data = d_func_dynamic(); |
| 985 | // store for indexing |
| 986 | LocalIndexedProblem indexedProblem(problem, this); |
| 987 | Q_ASSERT(indexedProblem.isValid()); |
| 988 | data->m_problemsList().append(indexedProblem); |
| 989 | Q_ASSERT(indexedProblem.data(this)); |
| 990 | } |
| 991 | |
| 992 | void TopDUContext::clearProblems() |
| 993 | { |