qt6-bb10/tests/auto/corelib/kernel
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
..
qapplicationstatic Introduce Q_APPLICATION_STATIC 2021-11-18 20:53:27 +01:00
qcoreapplication Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
qdeadlinetimer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qelapsedtimer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qeventdispatcher QEventDispatcher(Win): Always honor interrupted status to avoid races 2021-03-11 12:11:18 +01:00
qeventloop Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
qjnienvironment Android: check if objectClass() is not null in registerNativeMethods() 2021-11-15 19:00:21 +00:00
qjniobject Fix set*Field JNI template calls 2021-05-05 16:28:27 +03:00
qmath Add qHypot() to qmath.h, exposing and extending std::hypot() 2021-01-27 15:00:57 +01:00
qmetacontainer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmetaenum Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmetamethod QMetaMethod: Store method constness in metaobject system 2021-05-07 21:50:58 +02:00
qmetaobject Remove checks for features available in C++17 2021-10-02 17:54:39 +02:00
qmetaobjectbuilder QMetaObjectBuilder: remove unused serialization code 2021-03-20 10:24:27 +01:00
qmetaproperty Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmetatype tst_qmetatype: Temporarily disable expensive tests on QNX 2021-11-25 09:53:34 +01:00
qmimedata Remove the qmake project files 2021-01-07 15:32:28 +01:00
qobject QObject: Q_ASSERT the object type before calling a PMF 2021-11-27 21:38:22 -08:00
qpointer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qproperty QObjectCompatProperty: Add support for custom getters 2021-10-20 17:04:51 +02:00
qsharedmemory Add missing dependencies of tests on their helper programs 2021-09-17 12:57:25 +02:00
qsignalblocker Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsignalmapper Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsocketnotifier CMake: Remove the usage of QT_SOURCE_TREE from tests 2021-07-12 18:56:14 +02:00
qsystemsemaphore Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
qtimer Include qproperty.h where needed 2021-11-04 21:45:02 +01:00
qtranslator Remove conditioning on Android embedded 2021-09-17 17:30:14 +02:00
qvariant tst_qvariant: fix -Wclass-memaccess 2021-11-16 06:46:52 +01:00
qwineventnotifier Repair tst_qwineventnotifier 2021-03-29 15:54:05 +02:00
CMakeLists.txt Introduce Q_APPLICATION_STATIC 2021-11-18 20:53:27 +01:00