From 45bace2ff99ba9b6c56087c1233092d50b6c49c7 Mon Sep 17 00:00:00 2001 From: Kari Oikarinen Date: Fri, 2 Mar 2018 16:43:15 +0200 Subject: [PATCH] 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) --- tests/benchmarks/corelib/kernel/qobject/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()); } }