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

Method revertAllRequests

kdevplatform/language/backgroundparser/backgroundparser.cpp:635–656  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633}
634
635void BackgroundParser::revertAllRequests(QObject* notifyWhenReady)
636{
637 Q_ASSERT(notifyWhenReady != nullptr);
638 Q_D(BackgroundParser);
639
640 QMutexLocker lock(&d->m_mutex);
641 for (auto it = d->m_documents.begin(); it != d->m_documents.end();) {
642 d->m_documentsForPriority[it.value().priority()].remove(it.key());
643
644 it->removeTargetsForListener(notifyWhenReady);
645
646 if ((*it).targets().isEmpty()) {
647 it = d->m_documents.erase(it);
648 --d->m_maxParseJobs;
649
650 continue;
651 }
652
653 d->m_documentsForPriority[it.value().priority()].insert(it.key());
654 ++it;
655 }
656}
657
658bool BackgroundParser::addListenerToDocumentIfExist(const IndexedString& url, TopDUContext::Features features, int priority,
659 QObject* notifyWhenReady, ParseJob::SequentialProcessingFlags flags,

Callers 3

~UsesCollectorMethod · 0.80
doKillMethod · 0.80
doKillMethod · 0.80

Calls 10

beginMethod · 0.45
endMethod · 0.45
removeMethod · 0.45
priorityMethod · 0.45
valueMethod · 0.45
keyMethod · 0.45
isEmptyMethod · 0.45
targetsMethod · 0.45
insertMethod · 0.45

Tested by 1

doKillMethod · 0.64