diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index 3e6595758ba..a79ef98b5d1 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -88,7 +88,8 @@ QPropertyBindingPrivate::~QPropertyBindingPrivate() if (firstObserver) firstObserver.unlink(); if (vtable->size) - vtable->destroy(reinterpret_cast(this) + sizeof(QPropertyBindingPrivate)); + vtable->destroy(reinterpret_cast(this) + + QPropertyBindingPrivate::getSizeEnsuringAlignment()); } void QPropertyBindingPrivate::unlinkAndDeref() @@ -171,7 +172,7 @@ QUntypedPropertyBinding::QUntypedPropertyBinding(QMetaType metaType, const Bindi { std::byte *mem = new std::byte[QPropertyBindingPrivate::getSizeEnsuringAlignment() + vtable->size](); d = new(mem) QPropertyBindingPrivate(metaType, vtable, std::move(location)); - vtable->moveConstruct(mem+sizeof(QPropertyBindingPrivate), function); + vtable->moveConstruct(mem + QPropertyBindingPrivate::getSizeEnsuringAlignment(), function); } QUntypedPropertyBinding::QUntypedPropertyBinding(QUntypedPropertyBinding &&other)