| 235 | } |
| 236 | |
| 237 | void Problem::rebuildDynamicData(DUContext* parent, uint ownIndex) |
| 238 | { |
| 239 | auto top = dynamic_cast<TopDUContext*>(parent); |
| 240 | Q_ASSERT(top); |
| 241 | |
| 242 | m_topContext = top; |
| 243 | m_indexInTopContext = ownIndex; |
| 244 | |
| 245 | // deserialize child diagnostics here, as the top-context might get unloaded |
| 246 | // but we still want to keep the child-diagnostics in-tact, as one would assume |
| 247 | // a shared-ptr works. |
| 248 | const auto data = d_func(); |
| 249 | m_diagnostics.reserve(data->diagnosticsSize()); |
| 250 | for (uint i = 0; i < data->diagnosticsSize(); ++i) { |
| 251 | m_diagnostics << ProblemPointer(data->diagnostics()[i].data(top)); |
| 252 | } |
| 253 | |
| 254 | DUChainBase::rebuildDynamicData(parent, ownIndex); |
| 255 | } |
| 256 | |
| 257 | QDebug operator<<(QDebug s, const Problem& problem) |
| 258 | { |
no test coverage detected