From: Jean-Marc Lasgouttes Date: Fri, 24 Feb 2017 23:32:58 +0000 (+0100) Subject: Remove unreachable return statement X-Git-Tag: 2.3.0alpha1~323 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=83cf59cf94b657f6c52e11ddd5d49c5ad7b5fbda;p=features.git Remove unreachable return statement ALso re-indent a bit. Fixes coverity issue 134137 --- diff --git a/src/frontends/qt4/qt_helpers.cpp b/src/frontends/qt4/qt_helpers.cpp index 1e3befc79f..92b1187317 100644 --- a/src/frontends/qt4/qt_helpers.cpp +++ b/src/frontends/qt4/qt_helpers.cpp @@ -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("" "" "
%2
") .arg(QString::number(int(best_width) + 1), text); - return text; }