diff options
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 3 | ||||
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index dfb6842d13..262afb2677 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -683,9 +683,6 @@ QMetaType::QMetaType(QtPrivate::QMetaTypeInterface *d) : d_ptr(d) d_ptr->ref.ref(); } -QMetaType::QMetaType() : d_ptr(nullptr) {} - -QMetaType::QMetaType(const QMetaType &other) : QMetaType(other.d_ptr) {} QMetaType &QMetaType::operator=(const QMetaType &other) { if (d_ptr != other.d_ptr) { diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index d964c16915..f59acf2d54 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -546,9 +546,9 @@ public: explicit QMetaType(int type); explicit QMetaType(QtPrivate::QMetaTypeInterface *d); - QMetaType(); + constexpr QMetaType() : d_ptr(nullptr) {} ~QMetaType(); - QMetaType(const QMetaType &other); + QMetaType(const QMetaType &other) : QMetaType(other.d_ptr) {} QMetaType &operator=(const QMetaType &); QMetaType(QMetaType &&other) : d_ptr(other.d_ptr) { other.d_ptr = nullptr; } QMetaType &operator=(QMetaType &&other) |