diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-08-31 14:01:12 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-08-31 19:14:55 +0200 |
commit | 90358f6042d1fe2db849e17e1b0c875fb0560b20 (patch) | |
tree | 493e57226970f613c18871d086ae88031b091fde /src/gui/kernel | |
parent | 8028474e62c584ed3d5bb0f662b9690ca029f028 (diff) |
Deprecate and remove uses of AA_DisableHighDpiScaling
Change-Id: Ibadce68775858c524b998aacad310905ba2c2e8e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qhighdpiscaling.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp index 816c3ccc4b..023e19ad9c 100644 --- a/src/gui/kernel/qhighdpiscaling.cpp +++ b/src/gui/kernel/qhighdpiscaling.cpp @@ -208,10 +208,8 @@ static inline qreal initialGlobalScaleFactor() factor based on display density information. These platforms include X11, Windows, and Android. - There are two APIs for enabling or disabling this behavior: + There is one API for enabling or disabling this behavior: - The QT_AUTO_SCREEN_SCALE_FACTOR environment variable. - - The AA_EnableHighDpiScaling and AA_DisableHighDpiScaling - application attributes Enabling either will make QHighDpiScaling call QPlatformScreen::pixelDensity() and use the value provided as the scale factor for the screen in @@ -265,9 +263,6 @@ static inline bool usePixelDensity() // reported by the platform plugin. There are several enablers and several // disablers. A single disable may veto all other enablers. - // Check if there is an explicit disable - if (QCoreApplication::testAttribute(Qt::AA_DisableHighDpiScaling)) - return false; bool screenEnvValueOk; const int screenEnvValue = qEnvironmentVariableIntValue(legacyAutoScreenEnvVar, &screenEnvValueOk); if (screenEnvValueOk && screenEnvValue < 1) @@ -488,9 +483,6 @@ void QHighDpiScaling::initHighDpiScaling() void QHighDpiScaling::updateHighDpiScaling() { - if (QCoreApplication::testAttribute(Qt::AA_DisableHighDpiScaling)) - return; - m_usePixelDensity = usePixelDensity(); if (m_usePixelDensity && !m_pixelDensityScalingActive) { |