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

Method fix

plugins/manpage/manpagedocumentation.cpp:111–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 }
110
111 void fix(QString& htmlPage)
112 {
113 const QLatin1String headEndTag("</head>");
114 const auto headEndTagPos = htmlPage.indexOf(headEndTag, 0, Qt::CaseInsensitive);
115 if (headEndTagPos == -1) {
116 qCWarning(MANPAGE) << "missing" << headEndTag << "on the HTML page.";
117 return;
118 }
119
120 // Apply our custom style sheet to normalize look of the page. Embed the <style> element
121 // into the HTML code directly rather than inject it with JavaScript to avoid reloading
122 // and flickering of large pages such as cmake-modules man page.
123 if (!m_customStyleSheet.isEmpty()) {
124 htmlPage.insert(headEndTagPos, m_customStyleSheet);
125 }
126
127 expandUnsupportedLinks(htmlPage, headEndTagPos);
128 }
129
130 void expandUnsupportedLinks(QString& htmlPage, int endPos)
131 {

Callers 1

processMethod · 0.80

Calls 3

indexOfMethod · 0.45
isEmptyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected