diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 2d9133dbae..0c8f273887 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -1358,23 +1358,6 @@ namespace QtPrivate } }; - template - struct ValueTypeIsMetaType - { - static bool registerConverter(int id) - { - const int toId = qMetaTypeId(); - if (!QMetaType::hasRegisteredConverterFunction(id, toId)) { - static const QtMetaTypePrivate::QSequentialIterableConvertFunctor o; - static const QtPrivate::ConverterFunctor > f(o); - return QMetaType::registerConverterFunction(&f, id, toId); - } - return true; - } - }; - template struct SequentialContainerConverterHelper : ValueTypeIsMetaType { @@ -1398,23 +1381,6 @@ namespace QtPrivate } }; - template - struct AssociativeValueTypeIsMetaType - { - static bool registerConverter(int id) - { - const int toId = qMetaTypeId(); - if (!QMetaType::hasRegisteredConverterFunction(id, toId)) { - static const QtMetaTypePrivate::QAssociativeIterableConvertFunctor o; - static const QtPrivate::ConverterFunctor > f(o); - return QMetaType::registerConverterFunction(&f, id, toId); - } - return true; - } - }; - template::Defined> struct KeyAndValueTypeIsMetaType { @@ -2057,6 +2023,42 @@ inline bool QtPrivate::IsMetaTypePair::registerConverter(int id) return true; } +namespace QtPrivate { + template + struct ValueTypeIsMetaType + { + static bool registerConverter(int id) + { + const int toId = qMetaTypeId(); + if (!QMetaType::hasRegisteredConverterFunction(id, toId)) { + static const QtMetaTypePrivate::QSequentialIterableConvertFunctor o; + static const QtPrivate::ConverterFunctor > f(o); + return QMetaType::registerConverterFunction(&f, id, toId); + } + return true; + } + }; + + template + struct AssociativeValueTypeIsMetaType + { + static bool registerConverter(int id) + { + const int toId = qMetaTypeId(); + if (!QMetaType::hasRegisteredConverterFunction(id, toId)) { + static const QtMetaTypePrivate::QAssociativeIterableConvertFunctor o; + static const QtPrivate::ConverterFunctor > f(o); + return QMetaType::registerConverterFunction(&f, id, toId); + } + return true; + } + }; +} + QT_END_NAMESPACE #endif // QMETATYPE_H