qtdeclarative/tests/auto/toolsupport
Marc Mutz 3f2183ce2c QQmlRefCount: de-virtualize dtor
Now that QQmlRefCounted ensures no-one uses ~QQmlRefCount() directly
anymore, we can make it non-virtual, shrinking the
sizeof(QQmlRefCount) from 8/16 to 4/4 bytes (32/64 bit platforms).

This requires moving the release() function from QQmlRefCount down
into QQmlRefCounted<T>, and static_cast'ing *this to T before calling
delete.

We need to be careful, of course, that no derived class relied on the
implied virtualness of ~QQmlRefCount() making their dtors virtual, so
require that all classes that use QQmlRefCounted are either final or
have a virtual destructor.

Update the toolsupport test and the TypeInformationVersion, as
sizeof(QQmlRefCount) was one the items checked.

Fixes: QTBUG-114817
Change-Id: I69afd36ec5b63313842c1438e0244503603ed96f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-06-25 15:28:23 +00:00
..
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-09-07 17:01:30 +02:00
tst_toolsupport.cpp QQmlRefCount: de-virtualize dtor 2023-06-25 15:28:23 +00:00