diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-07-05 13:52:38 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-07-27 12:35:50 -0700 |
commit | 2e6398bd4626c054f18ca9762523dfcb49e31ab8 (patch) | |
tree | 1df9696b2cbb51947ca0a5e77b443b48562a53d8 /src/corelib/kernel/qvariant.cpp | |
parent | cfdaf9226d5dd15a50cffa38ac39a1e29cb5e2fd (diff) |
QMetaType: don't record trivial construction function pointers
We can implement the trivial {default,copy,move} construction outselves
inside qmetatype.cpp and qvariant.cpp, simplifying the QMetaType
interface object, removing up to three relocations per QMTI.
This adds the testing for QMetaType::isXxxConstructible and
isDestructible that couldn't be added before.
Change-Id: Ic44396b31ba04712aab3fffd16ff0a28f541d507
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/kernel/qvariant.cpp')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 59148e1579..0fd14296e9 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -222,7 +222,8 @@ static void customConstruct(QVariant::Private *d, const void *copy) return; } - if (!isCopyConstructible(iface) || (!copy && !isDefaultConstructible(iface))) { + if (!isCopyConstructible(iface) || (!copy && !isDefaultConstructible(iface)) + || !isDestructible(iface)) { *d = QVariant::Private(); qWarning("QVariant: Provided metatype does not support " "destruction, copy and default construction"); |