| 298 | } |
| 299 | |
| 300 | void DUContextDynamicData::addImportedChildContext(DUContext* context) |
| 301 | { |
| 302 | // ENSURE_CAN_WRITE |
| 303 | DUContext::Import import(m_context, context); |
| 304 | |
| 305 | if (import.isDirect()) { |
| 306 | //Direct importers are registered directly within the data |
| 307 | if (d_func_dynamic()->m_importersList().contains(IndexedDUContext(context))) { |
| 308 | qCDebug(LANGUAGE) << m_context->scopeIdentifier(true).toString() << "importer added multiple times:" << |
| 309 | context->scopeIdentifier(true).toString(); |
| 310 | return; |
| 311 | } |
| 312 | |
| 313 | d_func_dynamic()->m_importersList().append(context); |
| 314 | } else { |
| 315 | //Indirect importers are registered separately |
| 316 | Importers::self().addImporter(import.indirectDeclarationId(), IndexedDUContext(context)); |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | //Can also be called with a context that is not in the list |
| 321 | void DUContextDynamicData::removeImportedChildContext(DUContext* context) |
no test coverage detected