diff --git a/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp index 7d6c1ef86d..6568307461 100644 --- a/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp +++ b/tests/benchmarks/gui/kernel/qguimetatype/tst_qguimetatype.cpp @@ -46,8 +46,11 @@ private: void tst_QGuiMetaType::constructableGuiTypes() { QTest::addColumn("typeId"); - for (int i = QMetaType::FirstGuiType; i <= QMetaType::LastGuiType; ++i) - QTest::newRow(QMetaType::typeName(i)) << i; + for (int i = QMetaType::FirstGuiType; i <= QMetaType::LastGuiType; ++i) { + QMetaType metaType(i); + if (metaType.isValid()) + QTest::newRow(QMetaType::typeName(i)) << i; + } }