mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-20 06:49:56 +00:00
Remove unreachable return statement
ALso re-indent a bit. Fixes coverity issue 134137
This commit is contained in:
parent
8a9ea4d264
commit
83cf59cf94
@ -614,17 +614,16 @@ QString formatToolTip(QString text, int em)
|
||||
QFont const font = QToolTip::font();
|
||||
int const px_width = em * QFontMetrics(font).width("M");
|
||||
// Determine the ideal width of the tooltip
|
||||
QTextDocument td("");
|
||||
td.setHtml(text);
|
||||
td.setDefaultFont(QToolTip::font());
|
||||
td.setTextWidth(px_width);
|
||||
double best_width = td.idealWidth();
|
||||
QTextDocument td("");
|
||||
td.setHtml(text);
|
||||
td.setDefaultFont(QToolTip::font());
|
||||
td.setTextWidth(px_width);
|
||||
double best_width = td.idealWidth();
|
||||
// Set the line wrapping with appropriate width
|
||||
return QString("<html><body><table><tr>"
|
||||
"<td align=justify width=%1>%2</td>"
|
||||
"</tr></table></body></html>")
|
||||
.arg(QString::number(int(best_width) + 1), text);
|
||||
return text;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user