tst_bench_qguimetatype: only consider valid metatypes
Otherwise the benchmark crashes as the data tag for the row would be empty. Fixes: QTBUG-91708 Pick-to: 6.0 6.1 Change-Id: I484ded5b8670571b80012e64d67846d3b8db5320 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
153716a914
commit
90dc1f9204
@ -46,9 +46,12 @@ private:
|
||||
void tst_QGuiMetaType::constructableGuiTypes()
|
||||
{
|
||||
QTest::addColumn<int>("typeId");
|
||||
for (int i = QMetaType::FirstGuiType; i <= QMetaType::LastGuiType; ++i)
|
||||
for (int i = QMetaType::FirstGuiType; i <= QMetaType::LastGuiType; ++i) {
|
||||
QMetaType metaType(i);
|
||||
if (metaType.isValid())
|
||||
QTest::newRow(QMetaType::typeName(i)) << i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void tst_QGuiMetaType::constructInPlace_data()
|
||||
|
Loading…
Reference in New Issue
Block a user