diff options
author | L. E. Segovia <amy@amyspark.me> | 2023-03-16 18:03:28 -0300 |
---|---|---|
committer | L. E. Segovia <amy@amyspark.me> | 2023-05-06 00:09:43 -0300 |
commit | 6136b92f540c15835e0c7eb7e01ab7b58fbea685 (patch) | |
tree | 385575d149b9a989d4cb819760f5062339d64484 /src/plugins/platforms/windows/CMakeLists.txt | |
parent | fdd0f7f8af63960bd50b5d9fb92848427d23106a (diff) |
Windows: implement retrieval for missing QScreen metadata
This commit implements the manufacturer, model, and serialNumber
properties of QScreen for the Windows operating system. These were not
available previously because the Display Devices API allows piecemeal
access to the EDID fields, and the GDI API only returns the i-th device
name, e.g. "\\.\DISPLAY1".
Accessing the EDID of a given screen is possible by, given a
WindowsScreenData instance storing the device path, pivoting from
SetupDiOpenDeviceInterfaceW and then extracting the corresponding blob
from the Registry through a key handle retrieved with
SetupDiOpenDevRegKey. This blob can be parsed just like in Linux with
the QEdidParser class. The resulting metadata is applied to
the WindowsScreenData instance.
Additionally, this commit implements support for clone groups by making
getPathInfo return a list of the matching DISPLAYCONFIG_PATH_INFO
instances, and then concatenating the monitorFriendlyDeviceName
and the EDID manufacturer, model and serialNumber properties.
This commit makes the Windows and Direct2D QPA plugins dependent on
setupapi, and extends the QEdidParser class availability condition to
include these platforms.
Pick-to: 6.5
Change-Id: I56886b035a3d15e6f90aad5d797aeda21f99ff74
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/CMakeLists.txt')
-rw-r--r-- | src/plugins/platforms/windows/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/CMakeLists.txt b/src/plugins/platforms/windows/CMakeLists.txt index 333b7d67f1..ca1bbcb758 100644 --- a/src/plugins/platforms/windows/CMakeLists.txt +++ b/src/plugins/platforms/windows/CMakeLists.txt @@ -56,6 +56,7 @@ qt_internal_add_plugin(QWindowsIntegrationPlugin imm32 ole32 oleaut32 + setupapi shell32 shlwapi user32 |