Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
5f1af52a
Commit
5f1af52a
authored
Jun 24, 2010
by
Robert Loehning
Browse files
Fixed unwanted line breaks in tool tips.
Task-number: QTCREATORBUG-1169
parent
985878cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cpphoverhandler.cpp
View file @
5f1af52a
...
...
@@ -397,12 +397,14 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
if
(
!
m_helpId
.
isEmpty
()
&&
!
helpLinks
.
isEmpty
())
{
if
(
showF1
)
{
m_toolTip
=
QString
(
QLatin1String
(
"<table><tr><td valign=middle><nobr>%1</td>"
// we need the original width without escape sequences
const
int
width
=
QFontMetrics
(
QToolTip
::
font
()).
width
(
m_toolTip
);
m_toolTip
=
QString
(
QLatin1String
(
"<table><tr><td valign=middle width=%2>%1</td>"
"<td><img src=
\"
:/cppeditor/images/f1.png
\"
></td></tr></table>"
))
.
arg
(
Qt
::
escape
(
m_toolTip
));
.
arg
(
Qt
::
escape
(
m_toolTip
))
.
arg
(
width
)
;
}
editor
->
setContextHelpId
(
m_helpId
);
}
else
if
(
!
m_toolTip
.
isEmpty
()
&&
Qt
::
mightBeRichText
(
m_toolTip
))
{
m_toolTip
=
QString
(
QLatin1String
(
"<nobr>%1"
)).
arg
(
Qt
::
escape
(
m_toolTip
));
m_toolTip
=
QString
(
QLatin1String
(
"<nobr>%1
</nobr>
"
)).
arg
(
Qt
::
escape
(
m_toolTip
));
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment