QObjectBenchmark: Don't try to set read-only properties

Avoid lots of warnings about not being able to set "modal".

Change-Id: I396718f14a55203f9989c03e20efc647c64795a9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Kari Oikarinen 2018-03-02 16:43:15 +02:00
parent f49c55a505
commit 45bace2ff9

View File

@ -133,7 +133,8 @@ void QObjectBenchmark::qproperty_benchmark_data()
const QMetaObject *mo = &QTreeView::staticMetaObject;
for (int i = 0; i < mo->propertyCount(); ++i) {
QMetaProperty prop = mo->property(i);
QTest::newRow(prop.name()) << QByteArray(prop.name());
if (prop.isWritable())
QTest::newRow(prop.name()) << QByteArray(prop.name());
}
}