Commit 6d353996 authored by Leandro Melo's avatar Leandro Melo
Browse files

Tooltips: Make sure tooltip is escaped (for rich text) when appending html.

parent 2a86cb13
...@@ -116,10 +116,12 @@ void CppHoverHandler::decorateToolTip() ...@@ -116,10 +116,12 @@ void CppHoverHandler::decorateToolTip()
if (help.isValid()) { if (help.isValid()) {
const QString &contents = help.extractContent(false); const QString &contents = help.extractContent(false);
if (!contents.isEmpty()) { if (!contents.isEmpty()) {
if (help.category() == TextEditor::HelpItem::ClassOrNamespace) if (help.category() == TextEditor::HelpItem::ClassOrNamespace) {
setToolTip(Qt::escape(toolTip()));
appendToolTip(contents); appendToolTip(contents);
else } else {
setToolTip(contents); setToolTip(contents);
}
} }
addF1ToToolTip(); addF1ToToolTip();
} }
......
...@@ -152,8 +152,10 @@ void BaseHoverHandler::decorateToolTip() ...@@ -152,8 +152,10 @@ void BaseHoverHandler::decorateToolTip()
if (lastHelpItemIdentified().isValid()) { if (lastHelpItemIdentified().isValid()) {
const QString &contents = lastHelpItemIdentified().extractContent(false); const QString &contents = lastHelpItemIdentified().extractContent(false);
if (!contents.isEmpty()) if (!contents.isEmpty()) {
setToolTip(Qt::escape(toolTip()));
appendToolTip(contents); appendToolTip(contents);
}
addF1ToToolTip(); addF1ToToolTip();
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment