From 73a764c24700089228b4092e983061f788c6d232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 19 Nov 2019 17:15:50 +0100 Subject: =?UTF-8?q?Don=E2=80=99t=20warn=20on=20QT=5FAUTO=5FSCREEN=5FSCALE?= =?UTF-8?q?=5FFACTOR=20usage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This warning turned out to be spammy, since the env. variable may be set by KDE, in which case there is nothing the user or app developer can do to fix the situation. QT_AUTO_SCREEN_SCALE_FACTOR is now Done on X11, and remains Deprecated on all other platforms. Change-Id: I9d372655624b0e0b822f0a70e9aec4b18ab98630 Reviewed-by: Frederik Gladhorn --- src/gui/kernel/qhighdpiscaling.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp index 0782a49481..fde6bb0180 100644 --- a/src/gui/kernel/qhighdpiscaling.cpp +++ b/src/gui/kernel/qhighdpiscaling.cpp @@ -56,6 +56,9 @@ Q_LOGGING_CATEGORY(lcScaling, "qt.scaling"); #ifndef QT_NO_HIGHDPISCALING static const char legacyDevicePixelEnvVar[] = "QT_DEVICE_PIXEL_RATIO"; + +// Note: QT_AUTO_SCREEN_SCALE_FACTOR is Done on X11, and should be kept +// working as-is. It's Deprecated on all other platforms. static const char legacyAutoScreenEnvVar[] = "QT_AUTO_SCREEN_SCALE_FACTOR"; static const char enableHighDpiScalingEnvVar[] = "QT_ENABLE_HIGHDPI_SCALING"; @@ -104,12 +107,6 @@ static inline qreal initialGlobalScaleFactor() if (dpr > 0) result = dpr; } - - if (qEnvironmentVariableIsSet(legacyAutoScreenEnvVar)) { - qWarning("Warning: %s is deprecated. Instead use:\n" - " %s to enable platform plugin controlled per-screen factors.", - legacyAutoScreenEnvVar, enableHighDpiScalingEnvVar); - } } return result; } -- cgit v1.2.3 From 5142fe2c54970040fb6967848156a5f28b5a2dc9 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Sat, 16 Nov 2019 19:25:11 +0100 Subject: rhi: d3d11: Do not rely on Win10-only enum value When building against a 8.1 or older SDK the Windows 10-only value DXGI_SWAP_EFFECT_FLIP_DISCARD may not be present. Just use the value directly. At runtime that code path cannot be hit anyway when running on 8.1 or older. Task-number: QTBUG-80084 Change-Id: I0974b82db770e5487315798432ee601937b96c5e Reviewed-by: Friedemann Kleint --- src/gui/rhi/qrhid3d11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp index 717f3e6d6c..5e576e9c6a 100644 --- a/src/gui/rhi/qrhid3d11.cpp +++ b/src/gui/rhi/qrhid3d11.cpp @@ -3922,7 +3922,7 @@ bool QD3D11SwapChain::buildOrResize() desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; desc.BufferCount = BUFFER_COUNT; desc.Scaling = DXGI_SCALING_STRETCH; - desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD; + desc.SwapEffect = DXGI_SWAP_EFFECT(4); // DXGI_SWAP_EFFECT_FLIP_DISCARD // Do not bother with AlphaMode, if won't work unless we go through // DirectComposition. Instead, we just take the other (DISCARD) // path for now when alpha is requested. -- cgit v1.2.3