[kdevelop/kdevelop] kdevplatform/language/duchain: DUChain: cleanup addDocumentChain
Jarmo Tiitto <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 8ad90ac26960890a4e0949358e225b27c2a46832 by Jarmo Tiitto.
Committed on 02/08/2026 at 13:13.
Pushed by jatothrim into branch 'master'.
DUChain: cleanup addDocumentChain
M +0 -7 kdevplatform/language/duchain/duchain.cpp
M +0 -1 kdevplatform/language/duchain/duchainprivate.cpp
https://invent.kde.org/kdevelop/kdevelop/-/commit/8ad90ac26960890a4e0949358e225b27c2a46832
diff --git a/kdevplatform/language/duchain/duchain.cpp b/kdevplatform/language/duchain/duchain.cpp
index 16e26b4183..3a9f5fdcfd 100644
--- a/kdevplatform/language/duchain/duchain.cpp
+++ b/kdevplatform/language/duchain/duchain.cpp
@@ -189,7 +189,6 @@ void DUChain::addDocumentChain(TopDUContext* chain)
// qCDebug(LANGUAGE) << "duchain: adding document" << chain->url().str() << " " << chain;
Q_ASSERT(chain);
-
Q_ASSERT(!sdDUChainPrivate->hasChainForIndex(chain->ownIndex()));
{
@@ -199,15 +198,9 @@ void DUChain::addDocumentChain(TopDUContext* chain)
DUChain::chainsByIndex[chain->ownIndex()] = chain;
}
- {
- Q_ASSERT(DUChain::chainsByIndex[chain->ownIndex()]);
- }
- Q_ASSERT(sdDUChainPrivate->hasChainForIndex(chain->ownIndex()));
sdDUChainPrivate->m_chainsByUrl.insert(chain->url(), chain);
- Q_ASSERT(sdDUChainPrivate->hasChainForIndex(chain->ownIndex()));
-
chain->setInDuChain(true);
// Remove this chain from m_loadingSet and m_pendingLoads.
diff --git a/kdevplatform/language/duchain/duchainprivate.cpp b/kdevplatform/language/duchain/duchainprivate.cpp
index ec93c2bbe1..82886ccf5d 100644
--- a/kdevplatform/language/duchain/duchainprivate.cpp
+++ b/kdevplatform/language/duchain/duchainprivate.cpp
@@ -325,7 +325,6 @@ DEFINE_LIST_MEMBER_HASH(EnvironmentInformationListItem, items, uint)
l.unlock();
// Finally add the chain.
context.chain->rebuildDynamicImportStructure();
- context.chain->setInDuChain(true);
instance->addDocumentChain(context.chain);
if (context.index == index) {
// Task accomplished.