summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cpphoverhandler.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-04-15 19:07:05 +0200
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-04-15 19:16:37 +0200
commit01a0ec161cf5e814b53151a040afc2ac1acd69f8 (patch)
tree6dcc4b6e673767c05b0c7186bb1a0379c60361fc /src/plugins/cppeditor/cpphoverhandler.cpp
parent02ebee6d23eaea537b571a56d51876c33b942565 (diff)
downloadqt-creator-01a0ec161cf5e814b53151a040afc2ac1acd69f8.tar.gz
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
Diffstat (limited to 'src/plugins/cppeditor/cpphoverhandler.cpp')
-rw-r--r--src/plugins/cppeditor/cpphoverhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp
index a4fd089c6a..a2e270b3e1 100644
--- a/src/plugins/cppeditor/cpphoverhandler.cpp
+++ b/src/plugins/cppeditor/cpphoverhandler.cpp
@@ -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);
}
}