Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/language/duchain/navigation/problemnavigationcontext.cpp
Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Line(s) | 126 | { | |||
---|---|---|---|---|---|
152 | QString description = escapedHtml(problem->description()); | 152 | QString description = escapedHtml(problem->description()); | ||
153 | QString explanation = escapedHtml(problem->explanation()); | 153 | QString explanation = escapedHtml(problem->explanation()); | ||
154 | 154 | | |||
155 | modifyHtml() += description; | 155 | modifyHtml() += description; | ||
156 | 156 | | |||
157 | // Add only non-empty explanation which differs from the problem description. | 157 | // Add only non-empty explanation which differs from the problem description. | ||
158 | // Skip this if we have more than one problem. | 158 | // Skip this if we have more than one problem. | ||
159 | if (m_problems.size() == 1 && !explanation.isEmpty() && explanation != description) | 159 | if (m_problems.size() == 1 && !explanation.isEmpty() && explanation != description) | ||
160 | modifyHtml() += "<p><i style=\"white-space:pre-wrap\">" + explanation + "</i></p>"; | 160 | modifyHtml() += QLatin1String("<p><i style=\"white-space:pre-wrap\">") + explanation + QLatin1String("</i></p>"); | ||
161 | 161 | | |||
162 | modifyHtml() += QStringLiteral("</td>"); | 162 | modifyHtml() += QStringLiteral("</td>"); | ||
163 | // END: right column | 163 | // END: right column | ||
164 | 164 | | |||
165 | modifyHtml() += QStringLiteral("</tr></table>"); | 165 | modifyHtml() += QStringLiteral("</tr></table>"); | ||
166 | 166 | | |||
167 | auto diagnostics = problem->diagnostics(); | 167 | auto diagnostics = problem->diagnostics(); | ||
168 | if (!diagnostics.isEmpty()) { | 168 | if (!diagnostics.isEmpty()) { | ||
Show All 38 Lines | 201 | if (assistant && !assistant->actions().isEmpty()) { | |||
207 | foreach (auto assistantAction, assistant->actions()) { | 207 | foreach (auto assistantAction, assistant->actions()) { | ||
208 | m_assistantsActions.append(assistantAction); | 208 | m_assistantsActions.append(assistantAction); | ||
209 | 209 | | |||
210 | if (currentIndex != startIndex) | 210 | if (currentIndex != startIndex) | ||
211 | modifyHtml() += QStringLiteral("<br/>"); | 211 | modifyHtml() += QStringLiteral("<br/>"); | ||
212 | 212 | | |||
213 | makeLink(i18n("Solution (%1)", currentIndex + 1), KEY_INVOKE_ACTION( currentIndex ), | 213 | makeLink(i18n("Solution (%1)", currentIndex + 1), KEY_INVOKE_ACTION( currentIndex ), | ||
214 | NavigationAction(KEY_INVOKE_ACTION( currentIndex ))); | 214 | NavigationAction(KEY_INVOKE_ACTION( currentIndex ))); | ||
215 | modifyHtml() += ": " + assistantAction->description().toHtmlEscaped(); | 215 | modifyHtml() += QLatin1String(": ") + assistantAction->description().toHtmlEscaped(); | ||
216 | 216 | | |||
217 | ++currentIndex; | 217 | ++currentIndex; | ||
218 | } | 218 | } | ||
219 | 219 | | |||
220 | modifyHtml() += QStringLiteral("</td></tr>"); | 220 | modifyHtml() += QStringLiteral("</td></tr>"); | ||
221 | modifyHtml() += QStringLiteral("</table>"); | 221 | modifyHtml() += QStringLiteral("</table>"); | ||
222 | } | 222 | } | ||
223 | } | 223 | } | ||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |