diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index a2767396a89..74416ce011a 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -245,22 +245,6 @@ enum CustomConstructNullabilityOption { // future option: AlwaysNull? }; - -template static QVariant::PrivateShared * -customConstructShared(size_t size, size_t align, F &&construct) -{ - struct Deleter { - void operator()(QVariant::PrivateShared *p) const - { QVariant::PrivateShared::free(p); } - }; - - // this is exception-safe - std::unique_ptr ptr; - ptr.reset(QVariant::PrivateShared::create(size, align)); - construct(ptr->data()); - return ptr.release(); -} - // the type of d has already been set, but other field are not set template static void customConstruct(const QtPrivate::QMetaTypeInterface *iface, QVariant::Private *d,