| 51 | } |
| 52 | |
| 53 | static void testMemberProperty() |
| 54 | { |
| 55 | auto *mo = MetaObjectRepository::instance()->metaObject(QStringLiteral("QThread")); |
| 56 | QVERIFY(mo->propertyCount() >= 7); // depends on Qt version |
| 57 | |
| 58 | MetaProperty *prop = nullptr; |
| 59 | for (int i = 0; i < mo->propertyCount(); ++i) { |
| 60 | prop = mo->propertyAt(i); |
| 61 | QVERIFY(prop); |
| 62 | if (strcmp(prop->name(), "priority") == 0) |
| 63 | break; |
| 64 | } |
| 65 | |
| 66 | QVERIFY(prop); |
| 67 | if (!prop) |
| 68 | return; // to silence clang-tidy |
| 69 | |
| 70 | QCOMPARE(prop->name(), "priority"); |
| 71 | QCOMPARE(prop->typeName(), "QThread::Priority"); |
| 72 | |
| 73 | QThread t; |
| 74 | QCOMPARE(prop->value(&t).value<QThread::Priority>(), t.priority()); |
| 75 | QCOMPARE(prop->isReadOnly(), false); |
| 76 | } |
| 77 | |
| 78 | static void testStaticProperty() |
| 79 | { |
nothing calls this directly
no test coverage detected