qt5base-lts/tests/auto
Li Xi a0e7fbd4d5 Test result of qobject_cast before dereferencing
Since QMainWindow::setMenuWidget accepts a QWidget (allowing users to
implement their own menu widget), we need to use qobject_cast on the
stored widget to see if it is a QMenuBar before calling QMenuBar APIs.

This qobject_cast may return nullptr.

Pick-to: 6.2
Fixes: QTBUG-98247
Change-Id: Iff1dbd24fa7ca09098fe49c179770356c966251d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-11-15 16:51:14 +01:00
..
bic/data Add binary compatibility files for 6.1 2021-09-03 13:41:25 +00:00
cmake CMake: Bump almost all cmake_minimum_required calls to 3.16 2021-09-22 19:36:49 +02:00
concurrent Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
corelib QFuture: support cancellation of continuation chain through parent 2021-11-13 18:13:08 +01:00
dbus tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
gui Fix tst_qfontdatabase on Windows with Freetype 2021-11-10 15:37:03 +01:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network QNI: Add API to check if connection is metered 2021-11-04 12:02:25 +01:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Update clipping area when antialiasing changes 2021-10-27 15:07:28 +08:00
printsupport Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
shared Remove false Q_UNREACHABLE from shaping code 2021-02-03 09:44:44 +01:00
sql testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
testlib Rename command-option to generate_expected_output.py 2021-10-01 19:24:31 +02:00
tools uic: Fix missing Python import when setting tab orders 2021-10-20 11:34:03 +02:00
widgets Test result of qobject_cast before dereferencing 2021-11-15 16:51:14 +01:00
xml QDomDocument::setContent: Open device if necessary 2021-11-09 18:33:39 +01:00
CMakeLists.txt Don't build tests/auto/tools when cross-compiling 2021-10-07 08:03:40 +02:00
network-settings.h Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00