From 54a09a41885e65fea4ca20d0e3d90d8f4e9e80c5 Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@kdab.com>
Date: Fri, 10 Jul 2015 01:06:45 +0200
Subject: [PATCH] Mark some QtMetaTypePrivate classes movable

These types are held in QVariant.

This change should be BC, because it's private API, even though
it is located in a public header file. The classes are used as
private data members in the respective public API classes, but
we don't change the size or composition, and holding these
types in a QList would be outside the use of non-private API
for which we promise BC.

Change-Id: I7ef1c1ca57e9d87c6474c97bb2fa8afef170c88f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
---
 src/corelib/kernel/qmetatype.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 753292852f3..9e3e1e94faf 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -740,6 +740,11 @@ ConverterFunctor<From, To, UnaryFunction>::~ConverterFunctor()
 
 }
 
+#define QT_METATYPE_PRIVATE_DECLARE_TYPEINFO(C, F)  \
+    }                                               \
+    Q_DECLARE_TYPEINFO(QtMetaTypePrivate:: C, (F)); \
+    namespace QtMetaTypePrivate {
+
 namespace QtMetaTypePrivate {
 template <typename T, bool Accepted = true>
 struct QMetaTypeFunctionHelper {
@@ -1067,6 +1072,7 @@ public:
       _copyIter(&_iterator, &other._iterator);
     }
 };
+QT_METATYPE_PRIVATE_DECLARE_TYPEINFO(QSequentialIterableImpl, Q_MOVABLE_TYPE)
 
 template<typename From>
 struct QSequentialIterableConvertFunctor
@@ -1234,6 +1240,7 @@ public:
       _copyIter(&_iterator, &other._iterator);
     }
 };
+QT_METATYPE_PRIVATE_DECLARE_TYPEINFO(QAssociativeIterableImpl, Q_MOVABLE_TYPE)
 
 template<typename From>
 struct QAssociativeIterableConvertFunctor
@@ -1290,6 +1297,7 @@ public:
     inline VariantData first() const { return _getFirst(&_pair, _metaType_id_first, _metaType_flags_first); }
     inline VariantData second() const { return _getSecond(&_pair, _metaType_id_second, _metaType_flags_second); }
 };
+QT_METATYPE_PRIVATE_DECLARE_TYPEINFO(QPairVariantInterfaceImpl, Q_MOVABLE_TYPE)
 
 template<typename From>
 struct QPairVariantInterfaceConvertFunctor;
-- 
GitLab