| 126 | } |
| 127 | |
| 128 | void testRWMetaObject() |
| 129 | { |
| 130 | QThread obj; |
| 131 | auto adaptor = PropertyAdaptorFactory::create(&obj, this); |
| 132 | QVERIFY(adaptor); |
| 133 | |
| 134 | QVERIFY(adaptor->count() > 3); |
| 135 | verifyPropertyData(adaptor); |
| 136 | |
| 137 | QSignalSpy spy(adaptor, &PropertyAdaptor::propertyChanged); |
| 138 | QVERIFY(spy.isValid()); |
| 139 | |
| 140 | auto idx = indexOfProperty(adaptor, "priority"); |
| 141 | QCOMPARE(adaptor->propertyData(idx).accessFlags(), PropertyData::Writable); |
| 142 | adaptor->writeProperty(idx, QThread::LowPriority); |
| 143 | QCOMPARE(spy.size(), 1); |
| 144 | QCOMPARE(spy.at(0).at(0).toInt(), idx); |
| 145 | QCOMPARE(spy.at(0).at(1).toInt(), idx); |
| 146 | adaptor->writeProperty(idx, QThread::NormalPriority); |
| 147 | QCOMPARE(spy.size(), 2); |
| 148 | QCOMPARE(spy.at(1).at(0).toInt(), idx); |
| 149 | QCOMPARE(spy.at(1).at(1).toInt(), idx); |
| 150 | } |
| 151 | |
| 152 | void testSequentialContainer() |
| 153 | { |
nothing calls this directly
no test coverage detected