diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-09-11 22:46:09 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-13 07:20:40 +0200 |
commit | 23e89956c184caaa3789be9ac52f85c30d830d34 (patch) | |
tree | 35a906fcef878d42f83adc673e43c2de7ac4eecf /src/corelib | |
parent | 1864b485e4c37db2ef09b8a47a5bf3cc570cc222 (diff) |
Fix new warnings under Clang 3.3
Probably added by a1898f4466518bf3e1b6e9154eec05ecf9d909e3.
qmetatype.h:70:29: error: inline function 'qMetaTypeId<QtMetaTypePrivate::QSequentialIterableImpl>' is not defined [-Werror,-Wundefined-inline]
qmetatype.h:1363:30: note: used here
const int toId = qMetaTypeId<QtMetaTypePrivate::QSequentialIterableImpl>();
qmetatype.h:70:29: error: inline function 'qMetaTypeId<QtMetaTypePrivate::QAssociativeIterableImpl>' is not defined [-Werror,-Wundefined-inline]
qmetatype.h:1386:30: note: used here
const int toId = qMetaTypeId<QtMetaTypePrivate::QAssociativeIterableImpl>();
Change-Id: I9afe1a3d50ab23eb701797e28b259966dc95a147
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 70 |
1 files changed, 36 insertions, 34 deletions
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 @@ -1359,23 +1359,6 @@ namespace QtPrivate }; template<typename T> - struct ValueTypeIsMetaType<T, true> - { - static bool registerConverter(int id) - { - const int toId = qMetaTypeId<QtMetaTypePrivate::QSequentialIterableImpl>(); - if (!QMetaType::hasRegisteredConverterFunction(id, toId)) { - static const QtMetaTypePrivate::QSequentialIterableConvertFunctor<T> o; - static const QtPrivate::ConverterFunctor<T, - QtMetaTypePrivate::QSequentialIterableImpl, - QtMetaTypePrivate::QSequentialIterableConvertFunctor<T> > f(o); - return QMetaType::registerConverterFunction(&f, id, toId); - } - return true; - } - }; - - template<typename T> struct SequentialContainerConverterHelper<T, true> : ValueTypeIsMetaType<T> { }; @@ -1398,23 +1381,6 @@ namespace QtPrivate } }; - template<typename T> - struct AssociativeValueTypeIsMetaType<T, true> - { - static bool registerConverter(int id) - { - const int toId = qMetaTypeId<QtMetaTypePrivate::QAssociativeIterableImpl>(); - if (!QMetaType::hasRegisteredConverterFunction(id, toId)) { - static const QtMetaTypePrivate::QAssociativeIterableConvertFunctor<T> o; - static const QtPrivate::ConverterFunctor<T, - QtMetaTypePrivate::QAssociativeIterableImpl, - QtMetaTypePrivate::QAssociativeIterableConvertFunctor<T> > f(o); - return QMetaType::registerConverterFunction(&f, id, toId); - } - return true; - } - }; - template<typename T, bool = QMetaTypeId2<typename T::key_type>::Defined> struct KeyAndValueTypeIsMetaType { @@ -2057,6 +2023,42 @@ inline bool QtPrivate::IsMetaTypePair<T, true>::registerConverter(int id) return true; } +namespace QtPrivate { + template<typename T> + struct ValueTypeIsMetaType<T, true> + { + static bool registerConverter(int id) + { + const int toId = qMetaTypeId<QtMetaTypePrivate::QSequentialIterableImpl>(); + if (!QMetaType::hasRegisteredConverterFunction(id, toId)) { + static const QtMetaTypePrivate::QSequentialIterableConvertFunctor<T> o; + static const QtPrivate::ConverterFunctor<T, + QtMetaTypePrivate::QSequentialIterableImpl, + QtMetaTypePrivate::QSequentialIterableConvertFunctor<T> > f(o); + return QMetaType::registerConverterFunction(&f, id, toId); + } + return true; + } + }; + + template<typename T> + struct AssociativeValueTypeIsMetaType<T, true> + { + static bool registerConverter(int id) + { + const int toId = qMetaTypeId<QtMetaTypePrivate::QAssociativeIterableImpl>(); + if (!QMetaType::hasRegisteredConverterFunction(id, toId)) { + static const QtMetaTypePrivate::QAssociativeIterableConvertFunctor<T> o; + static const QtPrivate::ConverterFunctor<T, + QtMetaTypePrivate::QAssociativeIterableImpl, + QtMetaTypePrivate::QAssociativeIterableConvertFunctor<T> > f(o); + return QMetaType::registerConverterFunction(&f, id, toId); + } + return true; + } + }; +} + QT_END_NAMESPACE #endif // QMETATYPE_H |