| 465 | } |
| 466 | |
| 467 | DeclarationWidget::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 | |
| 482 | TopContextUsesWidget::TopContextUsesWidget(IndexedDeclaration declaration, |
| 483 | const QList<IndexedDeclaration>& allDeclarations, |
nothing calls this directly
no test coverage detected