qt6-bb10/tests/auto/widgets/widgets
Laszlo Agocs 244daf4cfc Fix rhi flush eval perf. and native window problems
This effectively reverts a4a51f6a64
while solving the problem that change intended to fix by an
alternative approach: Swap the order of checks for rhi-based
flushing. Checking the widgets' wishes first was a mistake.  We should
first check what is forced, e.g. via the env.vars.  Then only move on
investigating the child widget hierarchy if there was nothing specific
requested.

This way having a QOpenGLWidget in a window and running with
QT_WIDGETS_RHI=1 QT_WIDGETS_RHI_BACKEND=vulkan will prioritize the
forced request (Vulkan) and so the QOpenGLWidget will gracefully not
render anything while printing the expected warning to tell what's
going on.

The expensive recursion plaguing the construction of larger widget
hierarchies is now avoided, that should no longer take seconds due to
walking the entire widget hierarchy of the top-level window every time
a new widget is added to it.

However, this then uncovered a set of problems concerning native child
widgets. The repaint manager seems to have an obvious mistake where
the usage of rhi (and so textures and whatnot) is decided based on
'widget' (which is either a top-level or a native child) instead of
'tlw' (which is the top-level with the backingstore). The usesRhiFlush
flag only really matters for a real top-level, not for native child
widgets.  The rhi-based flushing is tied to the backingstore, and the
backingstore comes from the top-level widget.

Finally, make the qopenglwidget autotest to actually exercise
something when it comes to QOpenGLWidgets (or their ancestors) turned
native.  The original code from a long time ago does not really test
native child widgets, because it turns the top-level into native which
is quite superfluous since the toplevel is backed by a native window
(and a backingstore) anyway.

Pick-to: 6.4
Task-number: QTBUG-105017
Fixes: QTBUG-108344
Fixes: QTBUG-108277
Change-Id: I1785b0ca627cf151aad06a5489f63874d787f087
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-14 11:05:48 +01:00
..
qabstractbutton Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qabstractscrollarea Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qabstractslider Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qabstractspinbox Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qbuttongroup Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qcalendarwidget Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qcheckbox Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qcombobox Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qcommandlinkbutton Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qdatetimeedit Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qdial Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qdialogbuttonbox Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qdockwidget Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qdoublespinbox Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qfocusframe Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qfontcombobox Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qframe Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qgroupbox Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qkeysequenceedit Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qlabel Deprecate QApplication::setActiveWindow() and mark as internal 2022-08-27 20:22:29 +02:00
qlcdnumber Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qlineedit Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qmainwindow Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qmdiarea Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qmdisubwindow Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qmenu Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qmenubar Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qopenglwidget Fix rhi flush eval perf. and native window problems 2022-11-14 11:05:48 +01:00
qplaintextedit Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qprogressbar Deprecate QApplication::setActiveWindow() and mark as internal 2022-08-27 20:22:29 +02:00
qpushbutton Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qradiobutton Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qscrollarea Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qscrollbar Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qsizegrip Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qslider Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qspinbox Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qsplashscreen Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qsplitter Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qstackedwidget Deprecate QApplication::setActiveWindow() and mark as internal 2022-08-27 20:22:29 +02:00
qstatusbar Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qtabbar Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qtabwidget Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qtextbrowser Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qtextedit Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qtoolbar Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qtoolbox Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qtoolbutton Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00