From f3d1d963c7c6bc5f9958c857b3d8baeab61c82c5 Mon Sep 17 00:00:00 2001 From: Andreas Buhr Date: Fri, 27 Nov 2020 11:18:00 +0100 Subject: Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this patch should have no impact on users. Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c Reviewed-by: Lars Knoll Reviewed-by: Andrei Golubev (cherry picked from commit 0440614af0bb08e373d8e3e40f90b6412c043d14) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp | 6 +++--- tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/auto/corelib/kernel') diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp index 0273962636..b49f770919 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -655,7 +655,7 @@ Q_DECLARE_METATYPE(Whity) #if !defined(Q_CC_CLANG) && defined(Q_CC_GNU) && Q_CC_GNU < 501 QT_BEGIN_NAMESPACE -Q_DECLARE_TYPEINFO(Whity, Q_MOVABLE_TYPE); +Q_DECLARE_TYPEINFO(Whity, Q_RELOCATABLE_TYPE); QT_END_NAMESPACE #endif @@ -1019,7 +1019,7 @@ qsizetype qHash(const CustomMovable &, qsizetype seed = 0) { return seed; } #if !defined(Q_CC_CLANG) && defined(Q_CC_GNU) && Q_CC_GNU < 501 QT_BEGIN_NAMESPACE -Q_DECLARE_TYPEINFO(CustomMovable, Q_MOVABLE_TYPE); +Q_DECLARE_TYPEINFO(CustomMovable, Q_RELOCATABLE_TYPE); QT_END_NAMESPACE #endif @@ -1057,7 +1057,7 @@ class P { Q_DECL_UNUSED_MEMBER char _[4]; }; QT_BEGIN_NAMESPACE #if defined(Q_CC_GNU) && Q_CC_GNU < 501 -Q_DECLARE_TYPEINFO(M, Q_MOVABLE_TYPE); +Q_DECLARE_TYPEINFO(M, Q_RELOCATABLE_TYPE); Q_DECLARE_TYPEINFO(P, Q_PRIMITIVE_TYPE); #endif QT_END_NAMESPACE diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index 6da7a73851..1b76566401 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -3382,7 +3382,7 @@ struct MyShared : QSharedData { }; QT_BEGIN_NAMESPACE -Q_DECLARE_TYPEINFO(MyMovable, Q_MOVABLE_TYPE); +Q_DECLARE_TYPEINFO(MyMovable, Q_RELOCATABLE_TYPE); QT_END_NAMESPACE Q_DECLARE_METATYPE(MyPrimitive) -- cgit v1.2.3