qt5base-lts/tests/auto/widgets
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
..
dialogs QFileDialog: Fix adding default suffix when file path contains dot 2021-11-12 00:26:14 +03:00
effects Fix tst_qgraphicseffect on Wayland 2021-03-11 08:04:21 +01:00
graphicsview Remove conditioning on Android embedded 2021-09-17 17:30:14 +02:00
itemviews QAIV: Reset double-click flag in mousePressEvent 2021-11-05 14:52:25 +01:00
kernel Calculate effect bounds when drawing widget graphics effect 2021-10-27 14:32:35 +03:00
styles macOS: make the slider knob big enough for BigSur and Monterey 2021-11-15 09:30:25 +01:00
util Fix references to QGuiApplication::lastWindowClosed 2021-10-13 22:30:08 +02:00
widgets Test result of qobject_cast before dereferencing 2021-11-15 16:51:14 +01:00
CMakeLists.txt Begin port of qtbase to CMake 2018-11-01 11:48:46 +00:00