diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-10-20 10:35:56 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-10-23 09:49:36 +0200 |
commit | 41751755881f88cea4bc534b650605bb944cde18 (patch) | |
tree | 732d75885e400fbd366f7d437fe0fbfb50b771af /src/corelib/kernel | |
parent | f2df8033f0ab1f27cf2310e32c4c13631bbaca63 (diff) |
Rename the QMetaType::MovableType flag to RelocatableType
Keep this in sync with the changes we have done in QTypeInfo.
Change-Id: Iaacb0f3cc5c46d3486084a1f6eca480a233d5e1a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 3 | ||||
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 307dc7a58d..4cf1ac6548 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -409,7 +409,8 @@ Q_GLOBAL_STATIC(QMetaTypeCustomRegistry, customTypeRegistry) \value NeedsConstruction This type has non-trivial constructors. If the flag is not set instances can be safely initialized with memset to 0. \value NeedsDestruction This type has a non-trivial destructor. If the flag is not set calls to the destructor are not necessary before discarding objects. - \value MovableType An instance of a type having this attribute can be safely moved by memcpy. + \value ReloctableType An instance of a type having this attribute can be safely moved to a different memory location using memcpy. + \omitvalue MovableType \omitvalue SharedPointerToQObject \value IsEnumeration This type is an enumeration. \value IsUnsignedEnumeration If the type is an Enumeration, its underlying type is unsigned. diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 5eb89e8552..4e8bae2316 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -349,7 +349,10 @@ public: enum TypeFlag { NeedsConstruction = 0x1, NeedsDestruction = 0x2, - MovableType = 0x4, + RelocatableType = 0x4, +#if QT_DEPRECATED_SINCE(6, 0) + MovableType Q_DECL_ENUMERATOR_DEPRECATED_X("Use RelocatableType instead.") = RelocatableType, +#endif PointerToQObject = 0x8, IsEnumeration = 0x10, SharedPointerToQObject = 0x20, @@ -1067,7 +1070,7 @@ namespace QtPrivate { template<typename T> struct QMetaTypeTypeFlags { - enum { Flags = (QTypeInfo<T>::isRelocatable ? QMetaType::MovableType : 0) + enum { Flags = (QTypeInfo<T>::isRelocatable ? QMetaType::RelocatableType : 0) | (QTypeInfo<T>::isComplex ? QMetaType::NeedsConstruction : 0) | (QTypeInfo<T>::isComplex ? QMetaType::NeedsDestruction : 0) | (IsPointerToTypeDerivedFromQObject<T>::Value ? QMetaType::PointerToQObject : 0) |