summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-06-15 08:57:53 +0200
committerLars Knoll <lars.knoll@qt.io>2020-06-16 13:49:39 +0200
commit87bc5f7a7ca6240845cc59d877824c7de01d614d (patch)
tree1b3534e39d2d13396496b754a9bf3c75a9610eb0 /src/corelib/kernel/qmetatype.h
parent68387e485c954d6db2cf423723883a0b6dae222c (diff)
Make the default constructor of QMetaType constexpr
And inline the copy constructor forwarding to another one. Change-Id: I3c4f76f7b14edd84f512ef0687416b20940e333a Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetatype.h')
-rw-r--r--src/corelib/kernel/qmetatype.h4
1 files changed, 2 insertions, 2 deletions
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)