Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97443

Crash - DpiAdjustmentPolicy resolved from wrong environment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 6.2.1, 6.3.0 Alpha
    • 6.3, 6.2
    • GUI: High-DPI
    • None
    • 2e73ff10797b9b069cf7abd8c353ad60bd6a088a (qt/qtbase/dev) d16e68f20f0e2739f80ce4ebccd9761686bff544 (qt/qtbase/6.2.1) 45878a7aef2ac773423b01719ffe1490b9ecbf1f (qt/qtbase/6.2)

    Description

      envDpiAdjustmentPolicy is incorrectly resolved from envScaleFactorRoundingPolicy:

      https://github.com/qt/qtbase/blob/826765f654e43034929ff6fbc975ab0ab5d6922a/src/gui/kernel/qhighdpiscaling.cpp#L499

      This resulted in QT_SCALE_FACTOR_ROUNDING_POLICY="Round" overriding QT_DPI_ADJUSTMENT_POLICY="AdjustDpi" and wrong warning message: 

      Unknown DPI adjustment policy: Round. Supported values are: AdjustDpi, DontAdjustDpi, AdjustUpOnly.

       
      More critically, if only QT_DPI_ADJUSTMENT_POLICY was set, Qt will crash since it was trying to read from a null envScaleFactorRoundingPolicy.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            jcl jcl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes