| 32 | } |
| 33 | |
| 34 | QString UsesNavigationContext::html(bool shorten) |
| 35 | { |
| 36 | Q_UNUSED(shorten); |
| 37 | clear(); |
| 38 | modifyHtml() += QStringLiteral("<html><body><p>"); |
| 39 | |
| 40 | if (auto context = previousContext()) { |
| 41 | modifyHtml() += navigationHighlight(i18n("Uses of ")); |
| 42 | makeLink(context->name(), context->name(), NavigationAction(context)); |
| 43 | } else { |
| 44 | KDevelop::DUChainReadLocker lock(DUChain::lock()); |
| 45 | if (Declaration* decl = m_declaration.data()) { |
| 46 | makeLink(i18n("Uses of %1", decl->toString()), DeclarationPointer( |
| 47 | decl), NavigationAction::NavigateDeclaration); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | modifyHtml() += QStringLiteral("</p></body></html>"); |
| 52 | |
| 53 | return currentHtml(); |
| 54 | } |
| 55 | |
| 56 | QWidget* UsesNavigationContext::widget() const |
| 57 | { |
no test coverage detected