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

Method addToEnvironmentManager

kdevplatform/language/duchain/duchain.cpp:1379–1396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1377}
1378
1379void DUChain::addToEnvironmentManager(TopDUContext* chain)
1380{
1381 ParsingEnvironmentFilePointer file = chain->parsingEnvironmentFile();
1382 if (!file)
1383 return; //We don't need to manage
1384
1385 Q_ASSERT(file->indexedTopContext().index() == chain->ownIndex());
1386
1387 if (ParsingEnvironmentFile* alreadyHave = sdDUChainPrivate->findInformation(file->indexedTopContext().index())) {
1388 ///If this triggers, there has already been another environment-information registered for this top-context.
1389 ///removeFromEnvironmentManager should have been called before to remove the old environment-information.
1390 Q_ASSERT(alreadyHave == file.data());
1391 Q_UNUSED(alreadyHave);
1392 return;
1393 }
1394
1395 sdDUChainPrivate->addEnvironmentInformation(file);
1396}
1397
1398void DUChain::removeFromEnvironmentManager(TopDUContext* chain)
1399{

Callers

nothing calls this directly

Calls 7

findInformationMethod · 0.80
indexMethod · 0.45
indexedTopContextMethod · 0.45
ownIndexMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected