mirror of
https://github.com/KDE/konsole.git
synced 2025-12-23 23:38:08 -05:00
Fix dividing integer issue (coverity)
This commit is contained in:
@@ -916,7 +916,8 @@ void TerminalPainter::drawAboveText(QPainter &painter,
|
|||||||
painter.drawLine(QLineF(x1, y, x2, y));
|
painter.drawLine(QLineF(x1, y, x2, y));
|
||||||
if (underline == RE_UNDERLINE_DOUBLE || underline == RE_UNDERLINE_CURL) {
|
if (underline == RE_UNDERLINE_DOUBLE || underline == RE_UNDERLINE_CURL) {
|
||||||
const int fontHeight = m_parentDisplay->terminalFont()->fontHeight();
|
const int fontHeight = m_parentDisplay->terminalFont()->fontHeight();
|
||||||
const qreal amplitude = fontHeight / 8;
|
const qreal amplitude = static_cast<qreal>(fontHeight) / 8.0;
|
||||||
|
|
||||||
if (underline == RE_UNDERLINE_DOUBLE) {
|
if (underline == RE_UNDERLINE_DOUBLE) {
|
||||||
if (amplitude)
|
if (amplitude)
|
||||||
painter.drawLine(x1, y - amplitude, x2, y - amplitude);
|
painter.drawLine(x1, y - amplitude, x2, y - amplitude);
|
||||||
|
|||||||
Reference in New Issue
Block a user