Changeset View
Changeset View
Standalone View
Standalone View
analyzers/cppcheck/parser.cpp
Show All 36 Lines | |||||
37 | public: | 37 | public: | ||
38 | CppcheckProblem() {} | 38 | CppcheckProblem() {} | ||
39 | ~CppcheckProblem() override {} | 39 | ~CppcheckProblem() override {} | ||
40 | 40 | | |||
41 | QString sourceString() const override { return QStringLiteral("Cppcheck"); }; | 41 | QString sourceString() const override { return QStringLiteral("Cppcheck"); }; | ||
42 | }; | 42 | }; | ||
43 | 43 | | |||
44 | /** | 44 | /** | ||
45 | * Convert the value of <verbose> attribute of <error> element from cppcheck's | 45 | * Convert the value of \<verbose\> attribute of \<error\> element from cppcheck's | ||
46 | * XML-output to 'good-looking' HTML-version. This is necessary because the | 46 | * XML-output to 'good-looking' HTML-version. This is necessary because the | ||
47 | * displaying of the original message is performed without line breaks - such | 47 | * displaying of the original message is performed without line breaks - such | ||
48 | * tooltips are uncomfortable to read, and large messages will not fit into the | 48 | * tooltips are uncomfortable to read, and large messages will not fit into the | ||
49 | * screen. | 49 | * screen. | ||
50 | * | 50 | * | ||
51 | * This function put the original message into <html> tag that automatically | 51 | * This function put the original message into \<html\> tag that automatically | ||
52 | * provides line wrapping by builtin capabilities of Qt library. The source text | 52 | * provides line wrapping by builtin capabilities of Qt library. The source text | ||
53 | * also can contain tokens '\012' (line break) - they are present in the case of | 53 | * also can contain tokens '\012' (line break) - they are present in the case of | ||
54 | * source code examples. In such cases, the entire text between the first and | 54 | * source code examples. In such cases, the entire text between the first and | ||
55 | * last tokens (i.e. source code) is placed into <pre> tag. | 55 | * last tokens (i.e. source code) is placed into \<pre\> tag. | ||
56 | * | 56 | * | ||
57 | * @param[in] input the original value of <verbose> attribute | 57 | * @param[in] input the original value of \<verbose\> attribute | ||
58 | * @return HTML version for displaying in problem's tooltip | 58 | * @return HTML version for displaying in problem's tooltip | ||
59 | */ | 59 | */ | ||
60 | QString verboseMessageToHtml( const QString & input ) | 60 | QString verboseMessageToHtml( const QString & input ) | ||
61 | { | 61 | { | ||
62 | QString output(QString("<html>%1</html>").arg(input.toHtmlEscaped())); | 62 | QString output(QString("<html>%1</html>").arg(input.toHtmlEscaped())); | ||
63 | 63 | | |||
64 | output.replace("\\012", "\n"); | 64 | output.replace("\\012", "\n"); | ||
65 | 65 | | |||
▲ Show 20 Lines • Show All 227 Lines • Show Last 20 Lines |