| 1377 | } |
| 1378 | |
| 1379 | void 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 | |
| 1398 | void DUChain::removeFromEnvironmentManager(TopDUContext* chain) |
| 1399 | { |
nothing calls this directly
no test coverage detected