From e247fbb4fa9c97ed38ab5763d159d5a4f25ec0e8 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Mon, 3 Apr 2023 16:56:00 +0100 Subject: [PATCH] Fix Mac compilation error --- sdrgui/gui/coursedeviationindicator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdrgui/gui/coursedeviationindicator.cpp b/sdrgui/gui/coursedeviationindicator.cpp index 6b3742122..ba5396d67 100644 --- a/sdrgui/gui/coursedeviationindicator.cpp +++ b/sdrgui/gui/coursedeviationindicator.cpp @@ -15,6 +15,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// +#include + #include #include "coursedeviationindicator.h" @@ -46,6 +48,8 @@ void CourseDeviationIndicator::setGlideSlopeDDM(float ddm) void CourseDeviationIndicator::paintEvent(QPaintEvent *event) { + (void) event; + QPainter painter(this); QRect r = rect(); @@ -168,7 +172,6 @@ void CourseDeviationIndicator::paintEvent(QPaintEvent *event) { QFontMetrics fm(painter.font()); QString text = "G/S"; - int tw = fm.horizontalAdvance(text); int th = fm.ascent() / 2; painter.setPen(QColor(0, 255, 0)); painter.drawText(midW + bgw + 2, midH + th, text);