summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2018-03-02 16:43:15 +0200
committerKari Oikarinen <kari.oikarinen@qt.io>2018-03-07 07:19:21 +0000
commit45bace2ff99ba9b6c56087c1233092d50b6c49c7 (patch)
tree437c9a03ab1bedb62558b572a824771153c944ff /tests
parentf49c55a50546bbc3202fc92977ab539ceea3c087 (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/benchmarks/corelib/kernel/qobject/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/benchmarks/corelib/kernel/qobject/main.cpp b/tests/benchmarks/corelib/kernel/qobject/main.cpp
index 13c1439e43..c11b13b7ea 100644
--- a/tests/benchmarks/corelib/kernel/qobject/main.cpp
+++ b/tests/benchmarks/corelib/kernel/qobject/main.cpp
@@ -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());
}
}