From fc478d1ef7fad638a25a2e4cd1bd73d85859be20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 27 Nov 2020 11:56:10 +0100 Subject: Update setHighDpiScaleFactorRoundingPolicy docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default is now passthrough. And let's not mention the environment variable overrides, as they are meant for internal testing. Change-Id: Ie2409e5411d4bdcdf041834cb5ca9e1215aa173a Reviewed-by: Morten Johan Sørvig (cherry picked from commit 58afadc624cf284cfe93d6a5c85557ed6e4f9765) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qnamespace.qdoc | 3 +-- src/gui/kernel/qguiapplication.cpp | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index fae3afddc1..4aded8643e 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -3238,8 +3238,7 @@ decide how non-integer scale factors (such as Windows 150%) are handled. The active policy is set by calling QGuiApplication::setHighDdpiScaleFactorRoundingPolicy() before - the application object is created, or by setting the QT_SCALE_FACTOR_ROUNDING_POLICY - environment variable. + the application object is created. \sa QGuiApplication::setHighDpiScaleFactorRoundingPolicy() diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 05933bac6a..c10b95e206 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -3633,14 +3633,11 @@ Qt::ApplicationState QGuiApplication::applicationState() ("small UI") or as 2x ("large UI"). See the Qt::HighDpiScaleFactorRoundingPolicy enum for a complete list of all options. - This function must be called before creating the application object, - and can be overridden by setting the QT_SCALE_FACTOR_ROUNDING_POLICY - environment variable. The QGuiApplication::highDpiScaleFactorRoundingPolicy() + This function must be called before creating the application object. + The QGuiApplication::highDpiScaleFactorRoundingPolicy() accessor will reflect the environment, if set. - The default value is Qt::HighDpiScaleFactorRoundingPolicy::Round. - On Qt for Android the default is Qt::HighDpiScaleFactorRoundingPolicy::PassThrough, - which preserves historical behavior from earlier Qt versions. + The default value is Qt::HighDpiScaleFactorRoundingPolicy::PassThrough. */ void QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy policy) { -- cgit v1.2.3