forked from qt-creator/qt-creator
Fixed unwanted wrapping of code editor tooltips
Turns out the <nobr> actually caused wrapping in some cases because the tag made the QToolTip turn on its wrapping feature due to the text being rich text. So avoid adding it to plain text tooltips unnecessarily. Reviewed-by: hunger Task-number: QTCREATORBUG-1169
This commit is contained in:
@@ -427,7 +427,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
|
||||
.arg(m_toolTip);
|
||||
}
|
||||
editor->setContextHelpId(m_helpId);
|
||||
} else if (!m_toolTip.isEmpty()) {
|
||||
} else if (!m_toolTip.isEmpty() && Qt::mightBeRichText(m_toolTip)) {
|
||||
m_toolTip = QString(QLatin1String("<nobr>%1")).arg(m_toolTip);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user