tst_qmetatype: fix two more unused typedefs (GCC 4.8 warning)
authorMarc Mutz <marc.mutz@kdab.com>
Wed, 25 Jul 2012 13:27:59 +0000 (15:27 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 25 Jul 2012 15:32:21 +0000 (17:32 +0200)
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>
tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp

index b5169fe..8247385 100644 (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);