summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qmetatype.cpp')
-rw-r--r--src/corelib/kernel/qmetatype.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 76537c79cb..d5a22ef07d 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -297,6 +297,14 @@ public:
int alias;
};
+namespace
+{
+union CheckThatItIsPod
+{ // This should break if QMetaTypeInterface is not a POD type
+ QMetaTypeInterface iface;
+};
+}
+
Q_DECLARE_TYPEINFO(QCustomTypeInfo, Q_MOVABLE_TYPE);
Q_GLOBAL_STATIC(QVector<QCustomTypeInfo>, customTypes)
Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock)
@@ -454,6 +462,10 @@ int QMetaType::registerType(const char *typeName, Deleter deleter,
inf.typeName = normalizedTypeName;
inf.creator = creator;
inf.deleter = deleter;
+#ifndef QT_NO_DATASTREAM
+ inf.loadOp = 0;
+ inf.saveOp = 0;
+#endif
inf.alias = -1;
inf.constructor = constructor;
inf.destructor = destructor;