summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-09-29 15:18:29 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-10-25 12:52:06 +0200
commit91e7925dded71e58bb581ec68cddc646ba193a52 (patch)
treea84b5825cd50a886e99c447355f3c73de3396b6e /src/gui/kernel
parent3be1509013a62be9ff239aaad8b7dc6ddcd4f86d (diff)
Fix build with -no-feature-highdpiscaling
Fixes: QTBUG-107054 Change-Id: Ie9fd57e8a97c94365ec9e170088af0a82c5e7ba3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
index 2122e556d5..0f4803d92a 100644
--- a/src/gui/kernel/qhighdpiscaling.cpp
+++ b/src/gui/kernel/qhighdpiscaling.cpp
@@ -750,7 +750,20 @@ QHighDpiScaling::ScaleAndOrigin QHighDpiScaling::scaleAndOrigin(const QWindow *w
return scaleAndOrigin(targetScreen, position);
}
-#else
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug debug, const QHighDpiScaling::ScreenFactor &factor)
+{
+ const QDebugStateSaver saver(debug);
+ debug.nospace();
+ if (!factor.name.isEmpty())
+ debug << factor.name << "=";
+ debug << factor.factor;
+ return debug;
+}
+#endif
+
+#else // QT_NO_HIGHDPISCALING
+
QHighDpiScaling::ScaleAndOrigin QHighDpiScaling::scaleAndOrigin(const QPlatformScreen *, QPoint *)
{
return { qreal(1), QPoint() };
@@ -765,19 +778,8 @@ QHighDpiScaling::ScaleAndOrigin QHighDpiScaling::scaleAndOrigin(const QWindow *,
{
return { qreal(1), QPoint() };
}
-#endif //QT_NO_HIGHDPISCALING
-#ifndef QT_NO_DEBUG_STREAM
-QDebug operator<<(QDebug debug, const QHighDpiScaling::ScreenFactor &factor)
-{
- const QDebugStateSaver saver(debug);
- debug.nospace();
- if (!factor.name.isEmpty())
- debug << factor.name << "=";
- debug << factor.factor;
- return debug;
-}
-#endif
+#endif // QT_NO_HIGHDPISCALING
QT_END_NAMESPACE