Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.9, 6.4.3, 6.5.0
-
None
-
-
e5c136c17 (dev), 443a9fa2b (6.6), 7615efae8 (6.5)
Description
The QWindowsTheme::queryHighContrast function incorrectly calls booleanSystemParametersInfo(SPI_GETHIGHCONTRAST, false). SPI_GETHIGHCONTRAST does not expect a BOOL, it expects a HIGHCONTRAST.
I guess this call is probably just always failing and queryHighContrast probably just always returns false because uiParam is wrong (0 instead of sizeof(HIGHCONTRAST)) and HIGHCONTRAST.cbSize is full of stack garbage instead of sizeof(HIGHCONTRAST), but this is based on a static analysis so I do not know what is really happening. I would guess that if Win32 were not failing the call then there would be stack corruption and presumably some complaints about random crashes.
Documentation for SPI_GETHIGHCONTRAST:
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-systemparametersinfow#spi_gethighcontrast
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-113645 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
478897,8 | Use correct parameters to query highcontrastmode on Windows | dev | qt/qtbase | Status: MERGED | +2 | 0 |
505315,2 | Use correct parameters to query highcontrastmode on Windows | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
507467,2 | Use correct parameters to query highcontrastmode on Windows | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |