Merge "tst_qguivariant benchmark: Only use valid QMetaTypes"
This commit is contained in:
commit
346d30144a
@ -46,9 +46,12 @@ private:
|
|||||||
void tst_QGuiMetaType::constructableGuiTypes()
|
void tst_QGuiMetaType::constructableGuiTypes()
|
||||||
{
|
{
|
||||||
QTest::addColumn<int>("typeId");
|
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;
|
QTest::newRow(QMetaType::typeName(i)) << i;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void tst_QGuiMetaType::constructInPlace_data()
|
void tst_QGuiMetaType::constructInPlace_data()
|
||||||
|
@ -57,9 +57,12 @@ tst_QGuiVariant::~tst_QGuiVariant()
|
|||||||
void tst_QGuiVariant::createGuiType_data()
|
void tst_QGuiVariant::createGuiType_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<int>("typeId");
|
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;
|
QTest::newRow(QMetaType::typeName(i)) << i;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Tests how fast a Qt GUI type can be default-constructed by a
|
// Tests how fast a Qt GUI type can be default-constructed by a
|
||||||
// QVariant. The purpose of this benchmark is to measure the overhead
|
// QVariant. The purpose of this benchmark is to measure the overhead
|
||||||
|
Loading…
x
Reference in New Issue
Block a user