diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qproperty.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index 3e6595758b..a79ef98b5d 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<std::byte *>(this) + sizeof(QPropertyBindingPrivate)); + vtable->destroy(reinterpret_cast<std::byte *>(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) |