Wang Yu 29b141d88f QWindowPrivate: Guard against not having any QScreens when updating DPR
On some platforms (Windows and macOS) it has been observed that the
platform layer removes all screens, without providing a dummy screen.
This results in QGuiApplication::screens() being empty. As updating
the cached DPR for a window is part of the window moving to a new
screen, we have to guard for the case where the window moves to
a nullptr screen (because QGuiApplication::primaryScreen() is now
null).

We use the QGuiApplication::devicePixelRatio() fallback path, which
returns 1.0 if there are no screens.

Fixes: QTBUG-128390
Pick-to: 6.7
Change-Id: I3ba20590047f1ef49c8d3ac5b7556b814a105ce4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fbf957de5feded9cbbd60feacaa08c9902815c38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-03 06:24:46 +00:00
2024-02-29 15:35:57 +01:00
2015-08-18 19:59:14 +00:00
2024-07-12 01:42:29 +00:00
2024-02-02 15:23:02 +00:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%