Differential D22158 Diff 60904 kdevplatform/language/duchain/navigation/abstractincludenavigationcontext.cpp
Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/language/duchain/navigation/abstractincludenavigationcontext.cpp
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | 81 | { | |||
---|---|---|---|---|---|
91 | QList<TopDUContext*> duchains = DUChain::self()->chainsForDocument(u); | 91 | QList<TopDUContext*> duchains = DUChain::self()->chainsForDocument(u); | ||
92 | //Pick the one duchain for this document that has the most child-contexts/declarations. | 92 | //Pick the one duchain for this document that has the most child-contexts/declarations. | ||
93 | //This prevents picking a context that is empty due to header-guards. | 93 | //This prevents picking a context that is empty due to header-guards. | ||
94 | TopDUContext* duchain = pickContextWithData(duchains, 2, m_type); | 94 | TopDUContext* duchain = pickContextWithData(duchains, 2, m_type); | ||
95 | 95 | | |||
96 | if (duchain) { | 96 | if (duchain) { | ||
97 | getFileInfo(duchain); | 97 | getFileInfo(duchain); | ||
98 | if (!shorten) { | 98 | if (!shorten) { | ||
99 | modifyHtml() += labelHighlight(i18n("Declarations:")) + QLatin1String("<br />"); | 99 | modifyHtml() += theme().labelHighlight(i18n("Declarations:")) + QLatin1String("<br />"); | ||
100 | bool first = true; | 100 | bool first = true; | ||
101 | QVector<IdentifierPair> decs; | 101 | QVector<IdentifierPair> decs; | ||
102 | addDeclarationsFromContext(duchain, first, decs); | 102 | addDeclarationsFromContext(duchain, first, decs); | ||
103 | } | 103 | } | ||
104 | } else if (duchains.isEmpty()) { | 104 | } else if (duchains.isEmpty()) { | ||
105 | modifyHtml() += i18n("not parsed yet"); | 105 | modifyHtml() += i18n("not parsed yet"); | ||
106 | } | 106 | } | ||
107 | 107 | | |||
108 | modifyHtml() += QLatin1String("</p></body></html>"); | 108 | modifyHtml() += QLatin1String("</p></body></html>"); | ||
109 | return currentHtml(); | 109 | return currentHtml(); | ||
110 | } | 110 | } | ||
111 | 111 | | |||
112 | void AbstractIncludeNavigationContext::getFileInfo(TopDUContext* duchain) | 112 | void AbstractIncludeNavigationContext::getFileInfo(TopDUContext* duchain) | ||
113 | { | 113 | { | ||
114 | modifyHtml() += | 114 | modifyHtml() += | ||
115 | QStringLiteral("%1: %2 %3: %4").arg(labelHighlight(i18nc("Files included into this file", "Includes"))).arg( | 115 | QStringLiteral("%1: %2 %3: %4").arg(theme().labelHighlight(i18nc("Files included into this file", "Includes"))).arg( | ||
116 | duchain->importedParentContexts().count()).arg(labelHighlight(i18nc( | 116 | duchain->importedParentContexts().count()).arg(theme().labelHighlight(i18nc( | ||
117 | "Count of files this file was included into", | 117 | "Count of files this file was included into", | ||
118 | "Included by"))).arg( | 118 | "Included by"))).arg( | ||
119 | duchain->importers().count()); | 119 | duchain->importers().count()); | ||
120 | modifyHtml() += QStringLiteral("<br />"); | 120 | modifyHtml() += QStringLiteral("<br />"); | ||
121 | } | 121 | } | ||
122 | 122 | | |||
123 | QString AbstractIncludeNavigationContext::name() const | 123 | QString AbstractIncludeNavigationContext::name() const | ||
124 | { | 124 | { | ||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |