Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/language/duchain/navigation/usesnavigationcontext.cpp
Show All 36 Lines | |||||
37 | } | 37 | } | ||
38 | 38 | | |||
39 | QString UsesNavigationContext::name() const { | 39 | QString UsesNavigationContext::name() const { | ||
40 | return QStringLiteral("Uses"); | 40 | return QStringLiteral("Uses"); | ||
41 | } | 41 | } | ||
42 | 42 | | |||
43 | QString UsesNavigationContext::html(bool shorten) { | 43 | QString UsesNavigationContext::html(bool shorten) { | ||
44 | clear(); | 44 | clear(); | ||
45 | modifyHtml() += "<html><body><p>" + fontSizePrefix(shorten); | 45 | modifyHtml() += QLatin1String("<html><body><p>") + fontSizePrefix(shorten); | ||
46 | 46 | | |||
47 | if(auto context = previousContext()) { | 47 | if(auto context = previousContext()) { | ||
48 | modifyHtml() += navigationHighlight(i18n("Uses of ")); | 48 | modifyHtml() += navigationHighlight(i18n("Uses of ")); | ||
49 | makeLink(context->name(), context->name(), NavigationAction(context)); | 49 | makeLink(context->name(), context->name(), NavigationAction(context)); | ||
50 | }else{ | 50 | }else{ | ||
51 | KDevelop::DUChainReadLocker lock(DUChain::lock()); | 51 | KDevelop::DUChainReadLocker lock(DUChain::lock()); | ||
52 | if(Declaration* decl = m_declaration.data()) { | 52 | if(Declaration* decl = m_declaration.data()) { | ||
53 | makeLink( i18n("Uses of %1", decl->toString()), DeclarationPointer(decl), NavigationAction::NavigateDeclaration); | 53 | makeLink( i18n("Uses of %1", decl->toString()), DeclarationPointer(decl), NavigationAction::NavigateDeclaration); | ||
54 | } | 54 | } | ||
55 | } | 55 | } | ||
56 | 56 | | |||
57 | modifyHtml() += fontSizeSuffix(shorten) + "</p></body></html>"; | 57 | modifyHtml() += fontSizeSuffix(shorten) + QLatin1String("</p></body></html>"); | ||
58 | 58 | | |||
59 | return currentHtml(); | 59 | return currentHtml(); | ||
60 | } | 60 | } | ||
61 | 61 | | |||
62 | QWidget* UsesNavigationContext::widget() const { | 62 | QWidget* UsesNavigationContext::widget() const { | ||
63 | return m_widget; | 63 | return m_widget; | ||
64 | } | 64 | } |