diff --git a/src/plugins/texteditor/basehoverhandler.cpp b/src/plugins/texteditor/basehoverhandler.cpp index dfe390d68fa..136fa30e769 100644 --- a/src/plugins/texteditor/basehoverhandler.cpp +++ b/src/plugins/texteditor/basehoverhandler.cpp @@ -142,15 +142,12 @@ void BaseHoverHandler::identifyMatch(TextEditorWidget *editorWidget, int pos, Re void BaseHoverHandler::decorateToolTip() { - if (Qt::mightBeRichText(toolTip())) - setToolTip(toolTip().toHtmlEscaped()); + m_toolTip = m_toolTip.toHtmlEscaped(); if (lastHelpItemIdentified().isValid() && !lastHelpItemIdentified().isFuzzyMatch()) { const QString &helpContents = lastHelpItemIdentified().extractContent(false); - if (!helpContents.isEmpty()) { - m_toolTip = toolTip().toHtmlEscaped(); + if (!helpContents.isEmpty()) m_toolTip = m_toolTip.isEmpty() ? helpContents : ("

" + m_toolTip + "


" + helpContents + "

"); - } } }