Fix new warnings under Clang 3.3

Probably added by a1898f4466.

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>
This commit is contained in:
Thiago Macieira 2013-09-11 22:46:09 -07:00 committed by The Qt Project
parent 1864b485e4
commit 23e89956c1

View File

@ -1358,23 +1358,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