QPair: specialise QTypeInfo based on the typeinfos of its arguments
authorMarc Mutz <marc.mutz@kdab.com>
Tue, 28 Feb 2012 18:54:46 +0000 (19:54 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 1 Mar 2012 13:26:06 +0000 (14:26 +0100)
commit15c141511fab24233d42b3c8593f0781a4931c8a
treeb0447061da9bcb9e5fa94f40687041ea63e0e783
parente17440586252551c6de169d9141daef1c31a1e7e
QPair: specialise QTypeInfo based on the typeinfos of its arguments

Specialise QTypeInfo<QPair<T1,T2>> based on the properties of
T1 and T2:

- If either T1 or T2 is Q_COMPLEX_TYPE, so is QPair<T1,T2>.
- Otherwise, if either T1 or T2 is Q_MOVABLE_TYPE, so is QPair<T1,T2>.
- Otherwise, QPair<T1,T2> is Q_PRIMITIVE_TYPE.

Change-Id: I8aecbd37e3b7924f77f38967498deabf1a19ca24
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
src/corelib/tools/qpair.h
tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
tests/auto/corelib/tools/qpair/qpair.pro [new file with mode: 0644]
tests/auto/corelib/tools/qpair/tst_qpair.cpp [new file with mode: 0644]
tests/auto/corelib/tools/tools.pro