From fd608b6a6b25c32d168f850a13f3059b3dc8357f Mon Sep 17 00:00:00 2001 From: Juha Vuolle Date: Fri, 11 Apr 2025 09:13:30 +0300 Subject: [PATCH] Allow configuring Qt without highdpiscaling on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When highdpiscaling feature is disabled, a default dummy QHighDpiScaling class is compiled in. This dummy class missed the roundScaleFactor() method used by qwindwswindow.cpp, causing a compilation error. Pick-to: 6.8 Fixes: QTBUG-135893 Change-Id: I754878b9bbd55f68f07a19618fc275f89f7f839f Reviewed-by: Tor Arne Vestbø Reviewed-by: Morten Johan Sørvig (cherry picked from commit 581e39b35f5a09640959112779514b3f11bc5c82) Reviewed-by: Qt Cherry-pick Bot --- src/gui/kernel/qhighdpiscaling_p.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/kernel/qhighdpiscaling_p.h b/src/gui/kernel/qhighdpiscaling_p.h index 4a2f4b7a1a3..ab27b990c21 100644 --- a/src/gui/kernel/qhighdpiscaling_p.h +++ b/src/gui/kernel/qhighdpiscaling_p.h @@ -344,6 +344,7 @@ public: static inline QPointF mapPositionToGlobal(const QPointF &pos, const QPoint &, const QWindow *) { return pos; } static inline QPointF mapPositionFromGlobal(const QPointF &pos, const QPoint &, const QWindow *) { return pos; } static inline QDpi logicalDpi(const QScreen *) { return QDpi(-1,-1); } + static inline qreal roundScaleFactor(qreal) { return 1.0; } }; namespace QHighDpi {