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

Method clear

kdevplatform/language/duchain/duchain.cpp:427–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425 }
426
427 void clear()
428 {
429 if (!m_cleanupDisabled)
430 doMoreCleanup();
431
432 DUChainWriteLocker writeLock(DUChain::lock());
433
434 QMutexLocker l(&m_chainsMutex);
435
436 const auto currentChainsByUrl = m_chainsByUrl;
437 for (TopDUContext* top : currentChainsByUrl) {
438 removeDocumentChainFromMemory(top);
439 }
440
441 m_indexEnvironmentInformations.clear();
442 m_fileEnvironmentInformations.clear();
443
444 Q_ASSERT(m_fileEnvironmentInformations.isEmpty());
445 Q_ASSERT(m_chainsByUrl.isEmpty());
446 }
447
448 ///DUChain must be write-locked
449 ///Also removes from the environment-manager if the top-context is not on disk

Callers 1

shutdownMethod · 0.45

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected