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

Method removeDocument

kdevplatform/language/backgroundparser/backgroundparser.cpp:675–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673}
674
675void BackgroundParser::removeDocument(const IndexedString& url, QObject* notifyWhenReady)
676{
677 Q_D(BackgroundParser);
678
679 Q_ASSERT(isValidURL(url));
680
681 QMutexLocker lock(&d->m_mutex);
682
683 auto documentParsePlanIt = d->m_documents.find(url);
684 if (documentParsePlanIt != d->m_documents.end()) {
685 auto& documentParsePlan = *documentParsePlanIt;
686 d->m_documentsForPriority[documentParsePlan.priority()].remove(url);
687
688 documentParsePlan.removeTargetsForListener(notifyWhenReady);
689
690 if (documentParsePlan.targets().isEmpty()) {
691 d->m_documents.erase(documentParsePlanIt);
692 --d->m_maxParseJobs;
693 } else {
694 //Insert with an eventually different priority
695 d->m_documentsForPriority[documentParsePlan.priority()].insert(url);
696 }
697 }
698}
699
700void BackgroundParser::parseDocuments()
701{

Callers 3

~TestFileMethod · 0.45
scheduleForParsingMethod · 0.45

Calls 9

isValidURLFunction · 0.85
findMethod · 0.45
endMethod · 0.45
removeMethod · 0.45
priorityMethod · 0.45
isEmptyMethod · 0.45
targetsMethod · 0.45
insertMethod · 0.45

Tested by 2

~TestFileMethod · 0.36