| 71 | } |
| 72 | |
| 73 | static void testModel() |
| 74 | { |
| 75 | ObjectMethodModel srcModel; |
| 76 | ClientMethodModel model; |
| 77 | model.setSourceModel(&srcModel); |
| 78 | |
| 79 | srcModel.setMetaObject(&staticMetaObject); |
| 80 | |
| 81 | QVERIFY(model.rowCount() > 0); |
| 82 | |
| 83 | auto idx = searchContainsIndex(&model, "deleteLater()"); |
| 84 | QVERIFY(idx.isValid()); |
| 85 | QVERIFY(idx.data(ObjectMethodModelRole::MethodSignature).toString().startsWith(QLatin1String("deleteLater"))); |
| 86 | QCOMPARE(idx.sibling(idx.row(), 1).data().toString(), QLatin1String("Slot")); |
| 87 | QVERIFY(idx.sibling(idx.row(), 1).data(ObjectMethodModelRole::MethodSignature).isNull()); |
| 88 | QCOMPARE(idx.sibling(idx.row(), 2).data().toString(), QLatin1String("Public")); |
| 89 | QCOMPARE(idx.sibling(idx.row(), 3).data().toString(), QLatin1String("QObject")); |
| 90 | |
| 91 | srcModel.setMetaObject(nullptr); |
| 92 | QCOMPARE(model.rowCount(), 0); |
| 93 | } |
| 94 | |
| 95 | static void testToolTip_data() |
| 96 | { |
nothing calls this directly
no test coverage detected