In the iOS theme, we determine the color scheme based on the the last UIWindow of the application, but listen to trait changes in the QUIWindow class. However, the last window of the application is not always a QUIWindow. Sometimes it can be a temporary UIWindow created by the system for transitioning or other effects. These kind of windows do not always follow the appearance of the app and the main window (QUIWindow), so we were sometimes ending up with the wrong color scheme being reported. This was happening when the app was put into background for example, which causes the traitCollectionDidChange method to be called and query the userInterfaceStyle of the last window to determine if the color scheme was changed. The queried window would sometimes end up being of type UITextEffectsWindow, etc. and report the wrong appearance. To fix, always make sure to get the appearance from a QUIWindow. Fixes: QTBUG-114571 Fixes: QTBUG-113169 Fixes: QTBUG-114191 Change-Id: Ic0b29c02c8e8100996d5cd31b37e6a5b839f5fb1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 551cbc5b15b46ca4b298a9dfe946f834e0cd2fed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%