summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qpair.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-03-04 21:32:40 +0100
committerLars Knoll <lars.knoll@nokia.com>2012-03-04 21:45:05 +0100
commit96232be1466e8c059c270b611ce7c32997ff60a9 (patch)
tree9bf47c0c2c84556415eee7f938a098ae7e542649 /src/corelib/tools/qpair.h
parent8db8a34f07a2f8cbd06dc0b593886a13d52ae4b1 (diff)
parentfb8c95bac09910c4dfa476ab97c6206b2e94ee53 (diff)
Merge remote-tracking branch 'origin/api_changes'
Conflicts: dist/changes-5.0.0 mkspecs/features/qt_module_config.prf qmake/project.cpp qmake/property.cpp Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
Diffstat (limited to 'src/corelib/tools/qpair.h')
-rw-r--r--src/corelib/tools/qpair.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/corelib/tools/qpair.h b/src/corelib/tools/qpair.h
index 5df33a4e9d..4dc28f2d26 100644
--- a/src/corelib/tools/qpair.h
+++ b/src/corelib/tools/qpair.h
@@ -63,6 +63,22 @@ struct QPair
T2 second;
};
+// mark QPair<T1,T2> as complex/movable/primitive depending on the
+// typeinfos of the constituents:
+template<class T1, class T2>
+class QTypeInfo< QPair<T1, T2> >
+{
+public:
+ enum {
+ isComplex = QTypeInfo<T1>::isComplex || QTypeInfo<T2>::isComplex,
+ isStatic = QTypeInfo<T1>::isStatic || QTypeInfo<T2>::isStatic,
+ isLarge = sizeof(QPair<T1, T2>) > sizeof(void*),
+ isPointer = false,
+ isDummy = false,
+ sizeOf = sizeof(QPair<T1, T2>)
+ };
+};
+
template <class T1, class T2>
Q_INLINE_TEMPLATE bool operator==(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2)
{ return p1.first == p2.first && p1.second == p2.second; }