]> git.lyx.org Git - features.git/commitdiff
Remove unreachable return statement
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 24 Feb 2017 23:32:58 +0000 (00:32 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 24 Feb 2017 23:32:58 +0000 (00:32 +0100)
ALso re-indent a bit.

Fixes coverity issue 134137

src/frontends/qt4/qt_helpers.cpp

index 1e3befc79fffb040e7d7091802ac02aae468c244..92b1187317fa9654cdc8ec1561e35761948639c0 100644 (file)
@@ -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;
 }