diff options
author | Jędrzej Nowacki <jedrzej.nowacki@nokia.com> | 2012-06-04 16:52:32 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-27 03:27:27 +0200 |
commit | 9b95ed1fe39853534b859a64095febeaf0975cf7 (patch) | |
tree | b331d00d5305a0b4d334d13af256e2af5db1f28f /src/corelib/tools | |
parent | 0feb2646748a65bafea8485104a2d5833c0d1558 (diff) |
Introduce QTypeInfoMerger.
QTypeInfoMerger class was created to allow "inheriting" QTypeInfo
traits. The class implementation was based on the QTypeInfo<QPair<>>
specialization, therefore the specialization was refactored to
use the new class.
Change-Id: I4ff3e5eac1d55da086dad84274cce2b2c0a721be
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qpair.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/corelib/tools/qpair.h b/src/corelib/tools/qpair.h index f8455339f3..b73bf6706a 100644 --- a/src/corelib/tools/qpair.h +++ b/src/corelib/tools/qpair.h @@ -66,18 +66,7 @@ struct QPair // 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>) - }; -}; +class QTypeInfo<QPair<T1, T2> > : public QTypeInfoMerger<QPair<T1, T2>, T1, T2> {}; // Q_DECLARE_TYPEINFO template <class T1, class T2> Q_INLINE_TEMPLATE bool operator==(const QPair<T1, T2> &p1, const QPair<T1, T2> &p2) |