QWidget re-uses backing stores created in QWidgetPrivate::create(). The Android platform plugin creates a new platform window, when a widget becomes a toplevel window. When it is hidden, the platform window is deleted. The link between QAndroidPlatformWindow and its backing store is made in the constructor of QAndroidPlatformBackingstore. When a new QAndroidPlatformWindow is constructed and the backing store is re-used, there is no more link between platform window and platform backing store. This has lead to screen assets not being painted, when shown more than once. This patch forces QWidgetPrivate::create() to construct a new backing store on Android. This way, toplevel windows always have a backing store associated with it. It adds an assertion to QAndroidPlatformScreen::addWindow(). That will make e.g. tst_QWidget::visible() crash without the fix. Fixes: QTBUG-97482 Change-Id: Ib1b172068b03549df161ab93ac24a273221d5423 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit dbb072eb2838a04e89e34dad686394a496d5de87) 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%