tst_qmetatype: fix two more unused typedefs (GCC 4.8 warning)

Also check the return value of
DefaultValueFactory<QMetaType::Void>::create(), the same way it's
done in testCreateHelper<QMetaType::Void>().

Change-Id: I3e6d7fca4ea74dbe65009f2eb2c64a1b3a370d68
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
Marc Mutz 2012-07-25 15:27:59 +02:00 committed by Qt by Nokia
parent 5fa0f19e2e
commit ff453fa757

View File

@ -628,7 +628,6 @@ static void testCreateHelper()
template<>
void testCreateHelper<QMetaType::Void>()
{
typedef MetaEnumToType<QMetaType::Void>::Type Type;
void *actual = QMetaType::create(QMetaType::Void);
if (DefaultValueTraits<QMetaType::Void>::IsInitialized) {
QVERIFY(DefaultValueFactory<QMetaType::Void>::create());
@ -968,13 +967,12 @@ static void testConstructHelper()
template<>
void testConstructHelper<QMetaType::Void>()
{
typedef MetaEnumToType<QMetaType::Void>::Type Type;
/*int size = */ QMetaType::sizeOf(QMetaType::Void);
void *storage = 0;
void *actual = QMetaType::construct(QMetaType::Void, storage, /*copy=*/0);
QCOMPARE(actual, storage);
if (DefaultValueTraits<QMetaType::Void>::IsInitialized) {
/*Type *expected = */ DefaultValueFactory<QMetaType::Void>::create();
QVERIFY(DefaultValueFactory<QMetaType::Void>::create());
}
QMetaType::destruct(QMetaType::Void, actual);
qFreeAligned(storage);