From 83cf59cf94b657f6c52e11ddd5d49c5ad7b5fbda Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sat, 25 Feb 2017 00:32:58 +0100 Subject: [PATCH] Remove unreachable return statement ALso re-indent a bit. Fixes coverity issue 134137 --- src/frontends/qt4/qt_helpers.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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; } -- 2.39.2