aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
authorAurélien Brooke <aurelien@bahiasoft.fr>2025-08-14 08:58:37 +0200
committerAurélien Brooke <aurelien@bahiasoft.fr>2025-09-23 08:56:14 +0200
commit2ff1ff3a2ca4798f39d10e478e4a9e3c47811c4f (patch)
tree005c429e6e1ebd39f9bf484620aa2758e77d2804 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
parentd66cfa93eefa185aa15d42e9dc38cbcdbd0578cb (diff)
QQmlValueTypeWrapper: ensure value types alignment is respected
Use QMetaType create() and destroy(), instead of operator new() + construct() and destruct() + operator delete(). The QMetaType functions do the same work, but with the correct alignment. For write(), align the alloca buffer by oversizing and std::align. Remove the if(gadgetPtr()) since QMetaType::destroy() accepts nullptr. Amends 30a95fa0ee4a456cc41d652bf5f6b3c1fce944fb. Change-Id: Ia28882cef864e0199465ad791cd40328d14a8add Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
0 files changed, 0 insertions, 0 deletions