QMetaType: Fix warnings about truncation from uint64 to int.

Triggers warnings with MSVC2010/64bit.

Change-Id: I90abdf4de416e0db554eb46e4b3cc7a0a38cb1db
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
This commit is contained in:
Friedemann Kleint 2012-06-28 11:32:35 +02:00 committed by Qt by Nokia
parent 3b2731839c
commit 4cf5ffc2a6

View File

@ -739,11 +739,11 @@ struct QMetaTypeId< SINGLE_ARG_TEMPLATE<T> > \
static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \
if (!metatype_id.load()) { \
QVarLengthArray<char, 24> name; \
name.append(#SINGLE_ARG_TEMPLATE, sizeof(#SINGLE_ARG_TEMPLATE) - 1); \
name.append(#SINGLE_ARG_TEMPLATE, int(sizeof(#SINGLE_ARG_TEMPLATE)) - 1); \
name.append('<'); \
const char *tName = QMetaType::typeName(qMetaTypeId<T>()); \
Q_ASSERT(tName); \
name.append(tName, strlen(tName)); \
name.append(tName, int(strlen(tName))); \
if (name.last() == '>') \
name.append(' '); \
name.append('>'); \