qt5base-lts/tests/auto
Thiago Macieira 0e72a846d3 QObject: Q_ASSERT the object type before calling a PMF
The old-syle signal-slot syntax had the advantage of not delivering
signals to slots in derived classes after that derived class's
destructor had finished running (because we called via the virtual
qt_metacall). The new syntax made no checks, so a conversion from the
old to the new syntax may introduce crashes or other data corruptions at
runtime if the destructor had completed.

This commit introduces a Q_ASSERT to print the class name that the
object is not any more. Since this is in inline code, this should get
enabled for users' debug modes and does not therefore depend on Qt being
built in debug mode.

It required some Private classes to be adapted to the new form, by
exposing the public q_func() in the public: part.

Pick-to: 6.2
Fixes: QTBUG-33908
Change-Id: Iccb47e5527544b6fbd75fffd16b874cdc08c1f3e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-11-27 21:38:22 -08: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 QObject: Q_ASSERT the object type before calling a PMF 2021-11-27 21:38:22 -08:00
dbus tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
gui rhi: Add a more sophisticated resource update autotest case 2021-11-27 00:19:27 +01:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network QAuthenticator: Filter out algorithms we don't support 2021-11-25 08:52:33 +00:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Stabilize tst_QAccessibilityMac 2021-11-26 14:22:05 +01:00
printsupport QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08: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 Long live QVERIFY_THROWS_NO_EXCEPTION! 2021-11-26 18:28:50 +01:00
tools Long live Q_GADGET_EXPORT! 2021-11-27 01:25:10 +01:00
widgets QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08: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