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

Method DeclarationWidget

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

Source from the content-addressed store, hash-verified

465}
466
467DeclarationWidget::DeclarationWidget(const CodeRepresentation& code, const IndexedDeclaration& decl)
468{
469 setFrameShape(NoFrame);
470 DUChainReadLocker lock(DUChain::lock());
471
472 setUpdatesEnabled(false);
473 if (Declaration* dec = decl.data()) {
474 auto* headerLabel = new QLabel(dec->isDefinition() ? i18n("Definition") : i18n("Declaration"));
475 addHeaderItem(headerLabel);
476 addItem(new OneUseWidget(decl, dec->url(), dec->rangeInCurrentRevision(), code));
477 }
478
479 setUpdatesEnabled(true);
480}
481
482TopContextUsesWidget::TopContextUsesWidget(IndexedDeclaration declaration,
483 const QList<IndexedDeclaration>& allDeclarations,

Callers

nothing calls this directly

Calls 4

isDefinitionMethod · 0.80
dataMethod · 0.45
urlMethod · 0.45

Tested by

no test coverage detected