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

Method html

kdevplatform/language/duchain/navigation/usesnavigationcontext.cpp:34–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34QString 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
56QWidget* UsesNavigationContext::widget() const
57{

Callers 2

updateMethod · 0.45
dataMethod · 0.45

Calls 6

modifyHtmlFunction · 0.85
NavigationActionClass · 0.85
clearFunction · 0.50
nameMethod · 0.45
dataMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected