MCPcopy Create free account
hub / github.com/KDE/kdevelop / addImportedChildContext

Method addImportedChildContext

kdevplatform/language/duchain/ducontext.cpp:300–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300void 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
321void DUContextDynamicData::removeImportedChildContext(DUContext* context)

Callers 1

Calls 7

scopeIdentifierMethod · 0.80
addImporterMethod · 0.80
IndexedDUContextClass · 0.70
isDirectMethod · 0.45
containsMethod · 0.45
toStringMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected