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

Method processUses

kdevplatform/language/duchain/navigation/useswidget.cpp:727–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725}
726
727void UsesWidget::UsesWidgetCollector::processUses(KDevelop::ReferencedTopDUContext topContext)
728{
729 if (!m_widget) {
730 return;
731 }
732
733 DUChainReadLocker lock;
734
735 qCDebug(LANGUAGE) << "processing" << topContext->url().str();
736 auto* widget = new TopContextUsesWidget(declaration(), declarations(), topContext.data());
737
738 // move to back if it's just the declaration/definition
739 bool toBack = widget->usesCount() == 0;
740 // move to front the item belonging to the current open document
741 IDocument* doc = ICore::self()->documentController()->activeDocument();
742 bool toFront = doc && (doc->url() == topContext->url().toUrl());
743
744 widget->setExpanded(true);
745
746 m_widget->addItem(widget, toFront ? ItemPriority::High : toBack ? ItemPriority::Low : ItemPriority::Medium);
747 m_widget->redrawHeaderLine();
748}
749
750QSize KDevelop::UsesWidget::sizeHint() const
751{

Callers

nothing calls this directly

Calls 10

strMethod · 0.80
activeDocumentMethod · 0.80
documentControllerMethod · 0.80
redrawHeaderLineMethod · 0.80
urlMethod · 0.45
dataMethod · 0.45
usesCountMethod · 0.45
toUrlMethod · 0.45
setExpandedMethod · 0.45
addItemMethod · 0.45

Tested by

no test coverage detected