summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qvariant.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-07-15 21:21:05 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-24 00:18:58 +0200
commit92b37676328a960bc092b1f3834233c550376457 (patch)
treeac75c61314238e7a6b24751f20d47a222ed97f08 /src/corelib/kernel/qvariant.h
parentd0ccb3aaf9052fc20cee08c825d8ccc9ac02fe8e (diff)
Remove refcounting of QMetaTypeInterface
It's only used for dynamic types in DBUS and QML, where we control things good enough to be able to handle the lifetime of those interfaces there. Change-Id: Ia7f8970d17a85b195db85fcdc2d8f1febd8753f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qvariant.h')
-rw-r--r--src/corelib/kernel/qvariant.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index 891243ffb1..41336a2d2d 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -426,28 +426,11 @@ class Q_CORE_EXPORT QVariant
Private() noexcept : is_shared(false), is_null(true), packedType(0) {}
explicit Private(const QMetaType &type) noexcept : is_shared(false), is_null(false)
{
- if (type.d_ptr)
- type.d_ptr->ref.ref();
quintptr mt = quintptr(type.d_ptr);
Q_ASSERT((mt & 0x3) == 0);
packedType = mt >> 2;
}
explicit Private(int type) noexcept : Private(QMetaType(type)) {}
- Private(const Private &other) : Private(other.type())
- {
- data = other.data;
- is_shared = other.is_shared;
- is_null = other.is_null;
- }
- Private &operator=(const Private &other)
- {
- if (&other != this) {
- this->~Private();
- new (this) Private(other);
- }
- return *this;
- }
- Q_CORE_EXPORT ~Private();
const void *storage() const
{ return is_shared ? data.shared->data() : &data.data; }