| 472 | } |
| 473 | |
| 474 | void CodeHighlightingInstance::highlightUse(DUContext* context, int index, const QColor& color) |
| 475 | { |
| 476 | Declaration* decl = context->topContext()->usedDeclarationForIndex(context->uses()[index].m_declarationIndex); |
| 477 | |
| 478 | auto type = typeForDeclaration(decl, context); |
| 479 | |
| 480 | if (type != CodeHighlightingType::Error |
| 481 | || ICore::self()->languageController()->completionSettings()->highlightSemanticProblems()) { |
| 482 | HighlightedRange h; |
| 483 | h.range = context->uses()[index].m_range; |
| 484 | h.attribute = m_highlighting->attributeForType(type, CodeHighlightingContext::Reference, color); |
| 485 | m_highlight.push_back(h); |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | void CodeHighlightingInstance::highlightUses(DUContext* context) |
| 490 | { |
nothing calls this directly
no test coverage detected