From f0e183b20b306a7a4a3d41b189b0517af43a33a9 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Mon, 12 May 2025 10:12:05 -0500 Subject: [PATCH] Gui: Make variable more local Eliminate a compiler warning about an unused variable by making the variable more local to the point-of-use. --- src/Gui/CommandView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index c2498240ad..c0e5c632aa 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -2688,11 +2688,11 @@ public: static QCursor makeCursor(QWidget* widget, const QSize& size, const char* svgFile, int hotX, int hotY) { - qreal pRatio = widget->devicePixelRatioF(); qreal hotXF = hotX; qreal hotYF = hotY; #if !defined(Q_OS_WIN32) && !defined(Q_OS_MACOS) if (qApp->platformName() == QLatin1String("xcb")) { + qreal pRatio = widget->devicePixelRatioF(); hotXF *= pRatio; hotYF *= pRatio; }